/** * Get the description of a bug category. Returns the category if no * description can be found. * * @param category * the category * @return the description of the category */ public String getBugCategoryDescription(String category) { BugCategory bc = DetectorFactoryCollection.instance().getBugCategory(category); return (bc != null ? bc.getShortDescription() : category); } }
public String getCategoryAbbrev() { String categoryAbbrev = null; BugCategory bcat = DetectorFactoryCollection.instance().getBugCategory(getCategory()); if (bcat != null) { categoryAbbrev = bcat.getAbbrev(); } if (categoryAbbrev == null) { categoryAbbrev = TextUIBugReporter.OTHER_CATEGORY_ABBREV; } return categoryAbbrev; }
if (pattern != null) { String categoryAbbrev = null; BugCategory bcat = DetectorFactoryCollection.instance().getBugCategory(pattern.getCategory()); if (bcat != null) { categoryAbbrev = bcat.getAbbrev();
public SuppressionDecorator(ComponentPlugin<BugReporterDecorator> plugin, BugReporter delegate) { super(plugin, delegate); category = plugin.getProperties().getProperty("category"); if (DetectorFactoryCollection.instance().getBugCategory(category) == null) { throw new IllegalArgumentException("Unable to find category " + category);
/** * Add BugCategory elements. * * @param bugCategorySet * all bug categories referenced in the BugCollection */ private void addBugCategories(Set<String> bugCategorySet) { Element root = document.getRootElement(); for (String category : bugCategorySet) { Element element = root.addElement("BugCategory"); element.addAttribute("category", category); Element description = element.addElement("Description"); description.setText(I18N.instance().getBugCategoryDescription(category)); BugCategory bc = DetectorFactoryCollection.instance().getBugCategory(category); if (bc != null) { // shouldn't be null String s = bc.getAbbrev(); if (s != null) { Element abbrev = element.addElement("Abbreviation"); abbrev.setText(s); } s = bc.getDetailText(); if (s != null) { Element details = element.addElement("Details"); details.setText(s); } } } }
/** * Get the description of a bug category. Returns the category if no * description can be found. * * @param category * the category * @return the description of the category */ public String getBugCategoryDescription(String category) { BugCategory bc = DetectorFactoryCollection.instance().getBugCategory(category); return (bc != null ? bc.getShortDescription() : category); }
public String getCategoryAbbrev() { String categoryAbbrev = null; BugCategory bcat = DetectorFactoryCollection.instance().getBugCategory(getCategory()); if (bcat != null) { categoryAbbrev = bcat.getAbbrev(); } if (categoryAbbrev == null) { categoryAbbrev = TextUIBugReporter.OTHER_CATEGORY_ABBREV; } return categoryAbbrev; }
if (pattern != null) { String categoryAbbrev = null; BugCategory bcat = DetectorFactoryCollection.instance().getBugCategory(pattern.getCategory()); if (bcat != null) { categoryAbbrev = bcat.getAbbrev();
public SuppressionDecorator(ComponentPlugin<BugReporterDecorator> plugin, BugReporter delegate) { super(plugin, delegate); category = plugin.getProperties().getProperty("category"); if (DetectorFactoryCollection.instance().getBugCategory(category) == null) { throw new IllegalArgumentException("Unable to find category " + category);
/** * Add BugCategory elements. * * @param bugCategorySet * all bug categories referenced in the BugCollection */ private void addBugCategories(Set<String> bugCategorySet) { Element root = document.getRootElement(); for (String category : bugCategorySet) { Element element = root.addElement("BugCategory"); element.addAttribute("category", category); Element description = element.addElement("Description"); description.setText(I18N.instance().getBugCategoryDescription(category)); BugCategory bc = DetectorFactoryCollection.instance().getBugCategory(category); if (bc != null) { // shouldn't be null String s = bc.getAbbrev(); if (s != null) { Element abbrev = element.addElement("Abbreviation"); abbrev.setText(s); } s = bc.getDetailText(); if (s != null) { Element details = element.addElement("Details"); details.setText(s); } } } }