diff --git a/pmd-netbeans/CHANGES.txt b/pmd-netbeans/CHANGES.txt index 67f14146e5..2fa5f07f84 100644 --- a/pmd-netbeans/CHANGES.txt +++ b/pmd-netbeans/CHANGES.txt @@ -1,3 +1,7 @@ +- [ 1790292 ] NPE while scanning closed document + +Version 2.0 +- Updated pmd to version 4.0 - Requires NB6.0M9 or newer IDE build - [ 1722116 ] pmd.scan.Scanner.run fails with Netbeans 6.0 - [ 1450727 ] PMD does not honour configured src file encoding diff --git a/pmd-netbeans/README.txt b/pmd-netbeans/README.txt index 2db69f52aa..1c87cda903 100644 --- a/pmd-netbeans/README.txt +++ b/pmd-netbeans/README.txt @@ -5,18 +5,14 @@ INSTALL ------------------------ 1) Start NetBeans - 2) Goto Tools --> Module Manager - 3) Press Update - 4) Choose "Install Manually Downloaded Modules (.nbm Files).". - 5) Press Next - 6) Choose Add - 7) Goto the directory where you downloaded pmd-netbeans and choose the file "pmd.nbm". - 8) Press OK - 9) Press Next -10) Press Next -11) Press Accept -12) Choose Include and confirm to install an usined module -13) Press Finish + 2) Goto Tools --> Plugins + 3) Switch to 'Downloaded' tab + 4) Press 'Add plugins' + 5) Goto the directory where you downloaded pmd-netbeans and choose the file "pmd.nbm". + 6) Press OK + 7) Press Install + 8) Accept the license + 9) Confirm installation of an usigned module ------------------------ USE @@ -62,8 +58,4 @@ REALTIME SCANNING 1) Start NetBeans 2) Goto Tools --> Options 3) Navigate to Miscelaneous section and expand PMD node -4) Click on "Enable scan" -5) Choose true to enable scan, false otherwise. -6) Click on "Scan interval" -7) Enter the number of seconds between each scan -XX) NetBeans requires a restart to disable scanning +4) Select "Enable scan" diff --git a/pmd-netbeans/build.xml b/pmd-netbeans/build.xml index d2f73b48b4..6497bda21e 100644 --- a/pmd-netbeans/build.xml +++ b/pmd-netbeans/build.xml @@ -2,9 +2,9 @@ - - - + + + @@ -32,8 +32,7 @@ - - + @@ -49,9 +48,8 @@ - + - diff --git a/pmd-netbeans/manifest.mf b/pmd-netbeans/manifest.mf index 9461971c57..d59a620619 100644 --- a/pmd-netbeans/manifest.mf +++ b/pmd-netbeans/manifest.mf @@ -1,5 +1,5 @@ Manifest-Version: 1.0 -OpenIDE-Module-Specification-Version: 1.9.1 +OpenIDE-Module-Specification-Version: 2.0 Created-By: Ole-Martin Mørk and Gunnlaugur Þór Briem, Radim Kubacki, Tomasz Slota OpenIDE-Module: pmd OpenIDE-Module-Layer: pmd/mf-layer.xml diff --git a/pmd-netbeans/nbproject/genfiles.properties b/pmd-netbeans/nbproject/genfiles.properties index 17271b0357..d15d3d8b41 100644 --- a/pmd-netbeans/nbproject/genfiles.properties +++ b/pmd-netbeans/nbproject/genfiles.properties @@ -1,5 +1,5 @@ # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=7134de0c +nbproject/build-impl.xml.data.CRC32=7a9ef2e5 nbproject/build-impl.xml.script.CRC32=209b78c0 -nbproject/build-impl.xml.stylesheet.CRC32=3f8b4615 +nbproject/build-impl.xml.stylesheet.CRC32=deb65f65 diff --git a/pmd-netbeans/nbproject/platform.properties b/pmd-netbeans/nbproject/platform.properties index 589bcd1537..d302095c5e 100644 --- a/pmd-netbeans/nbproject/platform.properties +++ b/pmd-netbeans/nbproject/platform.properties @@ -1,2 +1,2 @@ nbjdk.active=JDK_1.5 -nbplatform.active=NetBeans_IDE_6.0M9 +nbplatform.active=NetBeans_IDE_6.0 diff --git a/pmd-netbeans/src/pmd/NbRuleSetFactory.java b/pmd-netbeans/src/pmd/NbRuleSetFactory.java index d7e4db1a3e..40efe0f9ac 100644 --- a/pmd-netbeans/src/pmd/NbRuleSetFactory.java +++ b/pmd-netbeans/src/pmd/NbRuleSetFactory.java @@ -138,7 +138,7 @@ public class NbRuleSetFactory extends RuleSetFactory { } if (node.getNodeName() != null && node.getNodeName().equals("example")) { - rule.setExample(node.getFirstChild().getNextSibling().getNodeValue()); + rule.addExample(node.getFirstChild().getNextSibling().getNodeValue()); } if (node.getNodeName().equals("properties")) { diff --git a/pmd-netbeans/src/pmd/config/ConfigUtils.java b/pmd-netbeans/src/pmd/config/ConfigUtils.java index 12b87ecc71..6d7dd7c943 100644 --- a/pmd-netbeans/src/pmd/config/ConfigUtils.java +++ b/pmd-netbeans/src/pmd/config/ConfigUtils.java @@ -61,24 +61,6 @@ public abstract class ConfigUtils { extraFactories.add(NbRuleSetFactory.getDefault ()); } - /** - * Registers extra rules that are available. - * - * @param rules Collection of Rule objects. - */ - public static synchronized void addRuleSetFactory(RuleSetFactory fact) { - extraFactories.add(fact); - } - - /** - * Unregisters extra rules previously registered. - * - * @param rules Collection of Rule objects. - */ - public static synchronized void removeRuleSetFactory(RuleSetFactory fact) { - extraFactories.remove(fact); - } - /** * Determines the list of rules to use. This is done by iterating over all * known rules and, for each one, checking whether its name appears in the