@Override public void writeXML(XMLOutput xmlOutput, boolean disabled) throws IOException { xmlOutput.startTag("Bug"); if (disabled) { xmlOutput.addAttribute("disabled", "true"); } addAttribute(xmlOutput, "code", codes); addAttribute(xmlOutput, "pattern", patterns); addAttribute(xmlOutput, "category", categories); xmlOutput.stopTag(true); }
nextMatchedIsDisabled = "true".equals(disabled); if ("Bug".equals(qName)) { addMatcher(new BugMatcher(getOptionalAttribute(attributes, "code"), getOptionalAttribute(attributes, "pattern"), getOptionalAttribute(attributes, "category"))); } else if ("Class".equals(qName)) { "relOp", qName))); } else if ("BugCode".equals(qName)) { addMatcher(new BugMatcher(getRequiredAttribute(attributes, "name", qName), "", "")); } else if ("Local".equals(qName)) { addMatcher(new LocalMatcher(getRequiredAttribute(attributes, "name", qName))); } else if ("BugPattern".equals(qName)) { addMatcher(new BugMatcher("", getRequiredAttribute(attributes, "name", qName), "")); } else if ("Priority".equals(qName)) { addMatcher(new PriorityMatcher(getRequiredAttribute(attributes, "value", qName)));
return new RankMatcher(value); case BUGCODE: return new BugMatcher(value, null, null); case CATEGORY: return new BugMatcher(null, null, value); case CLASS: return new ClassMatcher(value); return new BugMatcher(null, value, null);
private static Matcher makeMatcher(Sortables s, BugInstance bug) { switch (s) { case BUGCODE: return new BugMatcher(s.getFrom(bug), null, null); case CATEGORY: return new BugMatcher(null, null, s.getFrom(bug)); case CLASS: return new ClassMatcher(s.getFrom(bug)); return new BugMatcher(null, s.getFrom(bug), null);
@Override public void writeXML(XMLOutput xmlOutput, boolean disabled) throws IOException { xmlOutput.startTag("Bug"); if (disabled) { xmlOutput.addAttribute("disabled", "true"); } addAttribute(xmlOutput, "code", codes); addAttribute(xmlOutput, "pattern", patterns); addAttribute(xmlOutput, "category", categories); xmlOutput.stopTag(true); }
nextMatchedIsDisabled = "true".equals(disabled); if ("Bug".equals(qName)) { addMatcher(new BugMatcher(getOptionalAttribute(attributes, "code"), getOptionalAttribute(attributes, "pattern"), getOptionalAttribute(attributes, "category"))); } else if ("Class".equals(qName)) { addMatcher(new DesignationMatcher(getRequiredAttribute(attributes, "designation", qName))); } else if ("BugCode".equals(qName)) { addMatcher(new BugMatcher(getRequiredAttribute(attributes, "name", qName), "", "")); } else if ("Local".equals(qName)) { addMatcher(new LocalMatcher(getRequiredAttribute(attributes, "name", qName))); } else if ("BugPattern".equals(qName)) { addMatcher(new BugMatcher("", getRequiredAttribute(attributes, "name", qName), "")); } else if ("Priority".equals(qName)) { addMatcher(new PriorityMatcher(getRequiredAttribute(attributes, "value", qName)));