private void addCategoryKey(String argument) { DetectorFactoryCollection i18n = DetectorFactoryCollection.instance(); for (String x : argument.split("[,|]")) { for (BugCategory category : i18n.getBugCategoryObjects()) { if (category.getAbbrev().equals(x) || category.getCategory().equals(x)) { this.categoryKey.add(category.getCategory()); break; } } } }
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; }
BugCategory bcat = DetectorFactoryCollection.instance().getBugCategory(pattern.getCategory()); if (bcat != null) { categoryAbbrev = bcat.getAbbrev();
/** * 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); } } } }
private void addCategoryKey(String argument) { DetectorFactoryCollection i18n = DetectorFactoryCollection.instance(); for (String x : argument.split("[,|]")) { for (BugCategory category : i18n.getBugCategoryObjects()) { if (category.getAbbrev().equals(x) || category.getCategory().equals(x)) { this.categoryKey.add(category.getCategory()); break; } } } }
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; }
BugCategory bcat = DetectorFactoryCollection.instance().getBugCategory(pattern.getCategory()); if (bcat != null) { categoryAbbrev = bcat.getAbbrev();
/** * 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); } } } }