@NonNull private List<Category> createCategoryList() { Set<Category> categorySet = Sets.newHashSetWithExpectedSize(20); for (Issue issue : getIssues()) { categorySet.add(issue.getCategory()); } List<Category> sorted = new ArrayList<>(categorySet); Collections.sort(sorted); return sorted; }
/** * Returns the available categories * * @return an iterator for all the categories, never null */ public List<Category> getCategories() { if (sCategories == null) { final Set<Category> categories = new HashSet<Category>(); for (Issue issue : getIssues()) { categories.add(issue.getCategory()); } List<Category> sorted = new ArrayList<Category>(categories); Collections.sort(sorted); sCategories = Collections.unmodifiableList(sorted); } return sCategories; }
List<Issue> sorted = new ArrayList<>(issues); Collections.sort(sorted, (issue1, issue2) -> { int d = issue1.getCategory().compareTo(issue2.getCategory()); if (d != 0) { return d; Category previousCategory = null; for (Issue issue : sorted) { Category category = issue.getCategory(); if (!category.equals(previousCategory)) { String name = category.getFullName();
writer.write("<br/>\n"); writer.write("Category: "); writer.write(issue.getCategory().getFullName()); writer.write("</div>\n");
if (issue.getCategory() != previousCategory) { writer.write("<tr><td></td><td class=\"categoryColumn\">"); previousCategory = issue.getCategory(); String categoryName = issue.getCategory().getFullName(); writer.write("<a href=\"#"); writer.write(categoryName);
private static void describeIssue(Issue issue) { System.out.println(issue.getId()); for (int i = 0; i < issue.getId().length(); i++) { System.out.print('-'); } System.out.println(); System.out.println(wrap("Summary: " + issue.getBriefDescription(TEXT))); System.out.println("Priority: " + issue.getPriority() + " / 10"); System.out.println("Severity: " + issue.getDefaultSeverity().getDescription()); System.out.println("Category: " + issue.getCategory().getFullName()); if (!issue.isEnabledByDefault()) { System.out.println("NOTE: This issue is disabled by default!"); System.out.println(String.format("You can enable it by adding %1$s %2$s", ARG_ENABLE, issue.getId())); } System.out.println(); System.out.println(wrap(issue.getExplanation(TEXT))); List<String> moreInfo = issue.getMoreInfo(); if (!moreInfo.isEmpty()) { System.out.println("More information: "); for (String uri : moreInfo) { System.out.println(uri); } } }
Issue issue = first.issue; if (issue.getCategory() != previousCategory) { previousCategory = issue.getCategory(); writer.write("\n<a name=\""); writer.write(issue.getCategory().getFullName()); writer.write("\"></a>\n"); writer.write("<div class=\"category\"><a href=\"#\" title=\"Return to top\">"); writer.write(issue.getCategory().getFullName()); writer.write("</a><div class=\"categorySeparator\"></div>\n"); writer.write("</div>\n");
return false; if (!issue.getCategory().equals(warning.issue.getCategory())) { return false;
issue.getCategory().getFullName()); writeAttribute(writer, 2, "priority", Integer.toString(issue.getPriority()));
int categoryDelta = issue.getCategory().compareTo(other.issue.getCategory()); if (categoryDelta != 0) { return categoryDelta;
if (issue.getCategory().getName().startsWith(category) || issue.getCategory().getFullName().startsWith(category)) { listIssue(System.out, issue); if (issue.getCategory().getName().startsWith(category) || issue.getCategory().getFullName().startsWith(category)) { describeIssue(issue); System.out.println(); if (issue.getCategory().getName().startsWith(category) || issue.getCategory().getFullName().startsWith(category)) { flags.getSuppressedIds().add(issue.getId()); if (issue.getCategory().getName().startsWith(category) || issue.getCategory().getFullName().startsWith(category)) { flags.getEnabledIds().add(issue.getId()); if (issue.getCategory().getName().startsWith(category) || issue.getCategory().getFullName().startsWith(category)) { checkedIds.add(issue.getId());
int categoryDelta = issue.getCategory().compareTo(other.issue.getCategory()); if (categoryDelta != 0) { return categoryDelta;
Category category = warnings.get(0).issue.getCategory(); if (category != previousCategory) { previousCategory = category;
private static boolean isIgnoredInIde(@NonNull Issue issue, @NonNull JavaContext context, @NonNull PsiElement node) { // Historically, the IDE would treat *all* support annotation warnings as // handled by the id "ResourceType", so look for that id too for issues // deliberately suppressed prior to Android Studio 2.0. Issue synonym = Issue.create("ResourceType", issue.getBriefDescription(TextFormat.RAW), issue.getExplanation(TextFormat.RAW), issue.getCategory(), issue.getPriority(), issue.getDefaultSeverity(), issue.getImplementation()); return context.getDriver().isSuppressed(context, synonym, node); }
boolean isError = first.severity.isError(); if (issue.getCategory() != previousCategory) { append("<tr><td class=\"countColumn\"></td><td class=\"categoryColumn\">"); previousCategory = issue.getCategory(); String categoryName = issue.getCategory().getFullName(); append("<a href=\"#"); append(categoryName);
Category category = issue.getCategory(); while (category != null && category != Category.LINT) { writeChip(category.getName());