protected boolean unRegisterBugCategory(BugCategory bc) { String category = bc.getCategory(); categoryDescriptionMap.remove(category); return true; }
/** * Add a BugCategory reported by the Plugin. * * @param bugCategory */ public void addBugCategory(BugCategory bugCategory) { BugCategory old = bugCategories.get(bugCategory.getCategory()); if (old != null) { throw new IllegalArgumentException("Category already exists"); } bugCategories.put(bugCategory.getCategory(), bugCategory); }
/** * Set the metadata for a bug category. If the category's metadata has * already been set, this does nothing. * @param bc * the BugCategory object holding the metadata for the category * * @return false if the category's metadata has already been set, true * otherwise */ public boolean registerBugCategory(BugCategory bc) { String category = bc.getCategory(); if (categoryDescriptionMap.get(category) != null) { return false; } categoryDescriptionMap.put(category, bc); return true; }
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; } } } }
/** * Get a Collection containing all known bug category keys. E.g., * "CORRECTNESS", "MT_CORRECTNESS", "PERFORMANCE", etc. * * Excludes hidden bug categories * * @return Collection of bug category keys. */ public Collection<String> getBugCategories() { ArrayList<String> result = new ArrayList<>(categoryDescriptionMap.size()); for(BugCategory c : categoryDescriptionMap.values()) { if (!c.isHidden()) { result.add(c.getCategory()); } } return result; }
protected boolean unRegisterBugCategory(BugCategory bc) { String category = bc.getCategory(); categoryDescriptionMap.remove(category); return true; }
/** * Add a BugCategory reported by the Plugin. * * @param bugCategory */ public void addBugCategory(BugCategory bugCategory) { BugCategory old = bugCategories.get(bugCategory.getCategory()); if (old != null) { throw new IllegalArgumentException("Category already exists"); } bugCategories.put(bugCategory.getCategory(), bugCategory); }
/** * Set the metadata for a bug category. If the category's metadata has * already been set, this does nothing. * @param bc * the BugCategory object holding the metadata for the category * * @return false if the category's metadata has already been set, true * otherwise */ public boolean registerBugCategory(BugCategory bc) { String category = bc.getCategory(); if (categoryDescriptionMap.get(category) != null) { return false; } categoryDescriptionMap.put(category, bc); return true; }
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; } } } }
/** * Get a Collection containing all known bug category keys. E.g., * "CORRECTNESS", "MT_CORRECTNESS", "PERFORMANCE", etc. * * Excludes hidden bug categories * * @return Collection of bug category keys. */ public Collection<String> getBugCategories() { ArrayList<String> result = new ArrayList<String>(categoryDescriptionMap.size()); for(BugCategory c : categoryDescriptionMap.values()) { if (!c.isHidden()) { result.add(c.getCategory()); } } return result; }