< prev index next >

application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/overview/ResultReportUi.java

Print this page

        

@@ -85,12 +85,12 @@
  */
 public class ResultReportUi {
 
         private static final String OVERVIEW_MAKE_SCALABLE = "overview.makeScalable();"; //$NON-NLS-1$
         private static final String OVERVIEW_UPDATE_PAGE_HEADERS_VISIBILITY = "overview.updatePageHeadersVisibility();"; //$NON-NLS-1$
-        private static final Pattern HTML_ANCHOR_PATTERN = Pattern.compile("<a href=\"(.*?)\">(.*?)</a>");
-        private static final String OPEN_BROWSER_WINDOW = "openWindowByUrl";
+        private static final Pattern HTML_ANCHOR_PATTERN = Pattern.compile("<a href=\"(.*?)\">(.*?)</a>"); //$NON-NLS-1$
+        private static final String OPEN_BROWSER_WINDOW = "openWindowByUrl"; //$NON-NLS-1$
 
         private static class Linker extends BrowserFunction {
 
                 private Iterable<HtmlResultGroup> resultGroups;
                 private IPageContainer editor;

@@ -289,13 +289,13 @@
                 }
                 return html;
         }
 
         private static String openWindowMethod(String url, String name){
-        return new StringBuilder().append("#\" onclick=\"").append(OPEN_BROWSER_WINDOW).append("(").append("\u0027")
-                .append(url).append("\u0027").append(',').append("\u0027")
-                .append(name).append("\u0027").append(");return false;").toString();
+        return new StringBuilder().append("#\" onclick=\"").append(OPEN_BROWSER_WINDOW).append("(").append("\u0027") //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+                .append(url).append("\u0027").append(',').append("\u0027") //$NON-NLS-1$ //$NON-NLS-2$
+                .append(name).append("\u0027").append(");return false;").toString();  //$NON-NLS-1$//$NON-NLS-2$
     }
 
         public ResultReportUi(boolean isSinglePage) {
                 this.isSinglePage = isSinglePage;
         }

@@ -349,11 +349,11 @@
                                         Result result = editor.getRuleManager().getResult(next);
                                         if (result == null) {
                                                 continue;
                                         }
                                         long score = Math.round(result.getScore());
-                                        String adjustedHtml = adjustAnchorFollowAction(RulesHtmlToolkit.getDescription(result));//$NON-NLS-1$ //$NON-NLS-2$
+                                        String adjustedHtml = adjustAnchorFollowAction(RulesHtmlToolkit.getDescription(result));
                                         String quoteEscape = adjustedHtml.replaceAll("\\\"", "\\\\\""); //$NON-NLS-1$ //$NON-NLS-2$
                                         String description = quoteEscape.replaceAll("\n", "</br>"); //$NON-NLS-1$ //$NON-NLS-2$
                                         script.append(String.format("overview.updateResult(\"%s\", %d, \"%s\");", //$NON-NLS-1$
                                                         result.getRule().getId(), score, description));
                                 }

@@ -428,11 +428,11 @@
                         browser.setText(adjustedHtml, true);
                         browser.setJavascriptEnabled(true);
                         browser.addProgressListener(new ProgressAdapter() {
                                 @Override
                                 public void completed(ProgressEvent event) {
-                                        new OpenWindowFunction(browser, OPEN_BROWSER_WINDOW); //$NON-NLS-1$
+                                        new OpenWindowFunction(browser, OPEN_BROWSER_WINDOW);
                                         new Linker(browser, "linker", descriptors, editor); //$NON-NLS-1$
                                         new Expander(browser, "expander"); //$NON-NLS-1$
                                         browser.execute(String.format("overview.showOk(%b);", showOk)); //$NON-NLS-1$
                                         if (isSinglePage) {
                                                 browser.execute(OVERVIEW_MAKE_SCALABLE);
< prev index next >