@Override public StringProperty build() { return new StringProperty(this.name, this.description, this.defaultValue, this.uiOrder, isDefinedInXML); } }
private Element createPropertyValueElement(PropertyDescriptor propertyDescriptor, Object value) { Element propertyElement = document.createElementNS(RULESET_2_0_0_NS_URI, "property"); propertyElement.setAttribute("name", propertyDescriptor.name()); String valueString = propertyDescriptor.asDelimitedString(value); if (XPathRule.XPATH_DESCRIPTOR.equals(propertyDescriptor)) { Element valueElement = createCDATASectionElement("value", valueString); propertyElement.appendChild(valueElement); } else { propertyElement.setAttribute("value", valueString); } return propertyElement; }
invalidRegexSuppress++; messages += "Rule " + fileName + "/" + rule.getName() + " should not have '" + Rule.VIOLATION_SUPPRESS_REGEX_DESCRIPTOR.name() + "', this is intended for end user customization only." + PMD.EOL; invalidXPathSuppress++; messages += "Rule " + fileName + "/" + rule.getName() + " should not have '" + Rule.VIOLATION_SUPPRESS_XPATH_DESCRIPTOR.name() + "', this is intended for end user customization only." + PMD.EOL; + " are missing), a proper ExternalURLInfo (" + invalidExternalInfoURL + " are invalid), a class name meeting conventions (" + invalidClassName + " are invalid), no '" + Rule.VIOLATION_SUPPRESS_REGEX_DESCRIPTOR.name() + "' property (" + invalidRegexSuppress + " are invalid), and no '" + Rule.VIOLATION_SUPPRESS_XPATH_DESCRIPTOR.name() + "' property (" + invalidXPathSuppress + " are invalid)" + PMD.EOL + messages);
invalidRegexSuppress++; messages += "Rule " + fileName + "/" + rule.getName() + " should not have '" + Rule.VIOLATION_SUPPRESS_REGEX_DESCRIPTOR.name() + "', this is intended for end user customization only." + PMD.EOL; invalidXPathSuppress++; messages += "Rule " + fileName + "/" + rule.getName() + " should not have '" + Rule.VIOLATION_SUPPRESS_XPATH_DESCRIPTOR.name() + "', this is intended for end user customization only." + PMD.EOL; + " are missing), a proper ExternalURLInfo (" + invalidExternalInfoURL + " are invalid), a class name meeting conventions (" + invalidClassName + " are invalid), no '" + Rule.VIOLATION_SUPPRESS_REGEX_DESCRIPTOR.name() + "' property (" + invalidRegexSuppress + " are invalid), and no '" + Rule.VIOLATION_SUPPRESS_XPATH_DESCRIPTOR.name() + "' property (" + invalidXPathSuppress + " are invalid)" + PMD.EOL + messages);
@Override public StringProperty build() { return new StringProperty(this.name, this.description, this.defaultValue, this.uiOrder, isDefinedInXML); } }
private Element createPropertyValueElement(PropertyDescriptor propertyDescriptor, Object value) { Element propertyElement = document.createElementNS(RULESET_2_0_0_NS_URI, "property"); propertyElement.setAttribute("name", propertyDescriptor.name()); String valueString = propertyDescriptor.asDelimitedString(value); if (XPathRule.XPATH_DESCRIPTOR.equals(propertyDescriptor)) { Element valueElement = createCDATASectionElement("value", valueString); propertyElement.appendChild(valueElement); } else { propertyElement.setAttribute("value", valueString); } return propertyElement; }