@Override protected void open(ISonarResource sonarResource) { SonarProject sonarProject = SonarProject.getInstance(sonarResource.getProject()); String url = new SonarUrls().resourceUrl(sonarResource); ISonarServer sonarServer = SonarCorePlugin.getServersManager().findServer(sonarProject.getUrl()); if (sonarServer == null) { showMessage( NLS.bind( Messages.No_matching_server_in_configuration_for_project, sonarProject.getProject().getName(), url)); return; } if (sonarServer.disabled()) { showMessage("Server is disabled."); return; } if (!WSClientFactory.getSonarClient(sonarServer).exists(sonarResource.getKey())) { showMessage("Not found."); return; } super.open(sonarProject, url); }
private SonarProject properties(ISonarResource resource) { return SonarProject.getInstance(resource.getProject()); }