/** * Get the detail text as a complete HTML document. */ public String getDetailHTML() { return getDetailHTML(getDetailText()); }
/** * Get an HTML document describing the bug pattern for given key in detail. * * @param key * which HTML details for retrieve */ public @Nonnull String getDetailHTML(String key) { BugPattern bugPattern = DetectorFactoryCollection.instance().lookupBugPattern(key); if (bugPattern == null) { return L10N.getLocalString("err.missing_pattern", "Error: missing bug pattern for key") + " " + key; } return bugPattern.getDetailHTML(); }
/** * Get the detail text as a complete HTML document. */ public String getDetailHTML() { return getDetailHTML(getDetailText()); }
/** * Get an HTML document describing the bug pattern for given key in detail. * * @param key * which HTML details for retrieve */ public @Nonnull String getDetailHTML(String key) { BugPattern bugPattern = DetectorFactoryCollection.instance().lookupBugPattern(key); if (bugPattern == null) { return L10N.getLocalString("err.missing_pattern", "Error: missing bug pattern for key") + " " + key; } return bugPattern.getDetailHTML(); }
@Override public void run() { summaryTopPanel.removeAll(); summaryTopPanel.add(mainFrameComponentFactory.bugSummaryComponent(bug.getAbridgedMessage(), bug)); for (BugAnnotation b : bug.getAnnotationsForMessage(true)) { summaryTopPanel.add(mainFrameComponentFactory.bugSummaryComponent(b, bug)); } BugPattern bugPattern = bug.getBugPattern(); String detailText = bugPattern.getDetailText() +"<br><p> <b>Bug kind and pattern: " + bugPattern.getAbbrev() + " - " + bugPattern.getType(); String txt = bugPattern.getDetailHTML(detailText); summaryHtmlArea.setText(txt); summaryTopPanel.add(Box.createVerticalGlue()); summaryTopPanel.revalidate(); SwingUtilities.invokeLater(new Runnable() { @Override public void run() { summaryHtmlScrollPane.getVerticalScrollBar().setValue( summaryHtmlScrollPane.getVerticalScrollBar().getMinimum()); } }); } });