@Override public void run(IMarker marker) { try { final IViewPart view = EclipseUtil.findView(CodeMetricsView.ID); final CodeMetricsView codeMetricsView = (CodeMetricsView) view; final StringBuilder url = new StringBuilder(); url.append("http://") .append(DexterClient.getInstance().getServerHost()) .append(":") // $NON-NLS-1$ //$NON-NLS-2$ .append(DexterClient.getInstance().getServerPort()) .append(DexterConfig.CODE_METRICS_BASE); // $NON-NLS-1$ // .append("?").append(DexterConfig.CODE_METRICS_FILE_NAME).append("=").append(fileName)//$NON-NLS-1$ // .append("&").append(DexterConfig.CODE_METRICS_MODULE_PATH).append("=").append(modulePath);//$NON-NLS-1$ codeMetricsView.setUrl(url.toString()); EclipseUtil.showView(CodeMetricsView.ID); } catch (DexterRuntimeException e) { DexterEclipseActivator.LOG.error(e.getMessage(), e); MessageDialog.openConfirm( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), Messages.CodeMetricsResolution_CODE_METRICS_ERROR, Messages.CodeMetricsResolution_CODE_METRICS_ERROR_DESC); } }
@Override public Image getImage() { return EclipseUtil.getImage( DexterEclipseActivator.PLUGIN_ID, "/icons/codeMetricsView7.gif"); // $NON-NLS-1$ }