Ryan Gustafson
f46b8fc0ba
RuleSetWriter class can be used to Serialize a RuleSet to XML in a standard fashion. Recommend PMD IDE plugins standardize their behavior.
The essence of this change is to add the RuleReference and RuleSetReference classes, which contain the details that were previously missing from the runtime representation which are available in the XML, specifically the details about usage of Rules by reference. This now means that XML <-> runtime RuleSet are interchangeable, a modification in one can be reflected in the other. PMD IDE plugins which support Rule editing can now use the core PMD classes and standard XML serialization, instead of implementing custom value objects and serialization mechanisms. The RuleReference class is essentially a wrapping around an existing Rule instance. It is the RuleReference which is directly contained in the RuleSet now, instead of the original Rule instance. Any code which uses instanceof checks on Rule instances will have problem when encountering a RuleReference. Thankfully this is a rare occurrence, only the RuleChain code seemed to have to be tweaked to deal with this. Even so, I wouldn't be surprised if something turns up that needs to be addressed. git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5764 51baf565-9d33-0410-a72c-fc3788e3496d
…
…
…
Description
Languages
Java
75.5%
Apex
9.7%
Kotlin
9.1%
ANTLR
2.7%
PLSQL
1%
Other
1.8%