PMD is a Java source code analyzer - it finds unused variables, questionable design decisions, empty catch blocks, and so forth. You can read much more about PMD here - http://pmd.sf.net/.
The checkbox tree makes it easy to pick complete rulesets, just check on a ruleset to select all the rules in a ruleset. You can also add your own custom rulesets by entering the path to your rules.xml file. Probably most handy for day-to-day use are the Basic, Import, and Unused Code rulesets.
The first time you install the PMD plugin, a number of rules are already selected. The selected rules are those suggested by PMD best practices -- unused code, basic rules, a few design rules, a few controversial rules, the imports rules, and the string rules. These are a good starting place. Feel free to add or remove rules as fits your needs.
These should be pretty much self-explanatory. One non-obvious thing is that if you check "Run PMD on Save", this will cause PMD to start automatically when jEdit starts. This is so PMD is ready to check your code the first time you save. This might cause jEdit to start just a little bit slower, but you probably won't notice that.
<p>Note that the configuration panel also contains the minimum tile size for CPD to turn up a duplicate chunk. Take a look at the <ahref="#releasenotes">Release Notes and Changelog</a>for more details on new features in this release.
The PMD plugin provides access to the Copy/Paste Detector. This can help identify and eliminate duplicate code in a project. The heuristics used in the detection are a little "fuzzy" in that it is able to detect code that is very close to the same as code found elsewhere and can identify duplicate code regardless of the formatting of whitespace.
The CPD is very fast. It can also work on a variety of languages. Currently the fully supported languages are Java, JSP, PHP, C/C++, Fortran, Ruby, and Javascript. Additionally, CPD can work with just about every file mode supported by jEdit, although results may not be perfect as the modes not specifically supported use a generic tokenizer that may not suitable for a particular language.
A new feature for running CPD in a directory is the ability to include files as specified by a regular expression. This makes it easy to narrow your search in a project that may have a lot of files with the same name.
<p>
Another new feature for running CPD in a directory is the ability to exclude files. This makes it much easier to run CPD on a high level directory in a Maven project so the files in the "target" directories can be skipped. Enter a regular expression in the "Exclusions" field in the directory chooser dialog. For Maven projects, enter <code>.*?/target/.*</code> to exclude all the "target" directories. The "Exclusions" regular expression works on the full path of a file, so this regex might not work in all cases (like maybe code for target.com?)
<p>
You can set both an inclusion regular expression and an exclusion regular expression. Files are first checked for inclusion then exclusion. This means the Maven example above is still valid.
Starting 2.1, you can now add Custom Defined Rulesets with PMD plugin. Previously, if you want to use your own rulesets with the PMD plugin, you had to unjar the pmd.jar file & add your ruleset defination in the jar file & re-jar it & use it. But this procedure had to be repeated whenever a new PMD is out. But not anymore. Now you can simply point PMD plugin to your custom rulesets.xml file & drop your custom ruleset jars in either of jEdit jars directory(either system or user). Once this is done, you will be able to manipulate your Custom Rulesets just the way like the built-in ones.
As of version 3.0, the PMD Plugin provides access to the PMD Rule Designer, which makes it easier to create your own custom rules. Start the Designer by going to Plugins -> PMD Plugin -> Run Rule Designer. The instructions for the Designer can be found on the PMD website at <ahref="http://pmd.sourceforge.net/xpathruletutorial.html">http://pmd.sourceforge.net/xpathruletutorial.html</a>.
PMD jEdit 2.2 adds updates PMD plugin to the latest and the greatest PMD release, updates to Dynamic class loading feature of jEdit and adds PMD to jEdit's File System Browser for easy access.
PMD jEdit plugin 2.5 updates to the latest PMD release, remove redundant menu options and makes usage of the plugin more compact. Look at the details Release notes and Changelog below.
Mouse-over on ruleset names now gives description of the ruleset in the example box. This makes it easier to understand what the group of rules is about.
Fixed a bug in 'check all files in a directory' where the plugin always defaulted to Java 1.4 rather than the Java version selected in the option pane.
Revised the option pane to use a checkbox tree rather than a list of checkboxes. The list was long (just under 200 rules), and didn't have any grouping by ruleset. The checkbox tree groups the rules by ruleset, and clicking the checkbox on the ruleset checks all rules contained by that ruleset. This is way easier than looking through the long list to pick out the rules.
Changed the way Rules are managed and given for execution to PMD due to addition of new languages to PMD and was giving error due to language mismatch.