From 5ff072aabadb078c90979027a2a7f6732aaf00f9 Mon Sep 17 00:00:00 2001 From: Radim Kubacki Date: Fri, 16 Dec 2005 17:24:22 +0000 Subject: [PATCH] updated to PMD3.4, fixed creating of RuleViolation in AbstractRules git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4074 51baf565-9d33-0410-a72c-fc3788e3496d --- pmd-netbeans/CHANGES.txt | 3 +++ pmd-netbeans/build.xml | 4 ++-- .../netbeans/modules/pmd/rules/ForeignBundleCodeRule.java | 4 ++-- .../pmd/rules/MissingPrivateInnerClassConstructorRule.java | 2 +- .../netbeans/modules/pmd/rules/StaticBundleCodeRule.java | 2 +- pmd-netbeans/manifest.mf | 2 +- pmd-netbeans/nbproject/project.properties | 2 +- pmd-netbeans/nbproject/project.xml | 6 +++--- 8 files changed, 14 insertions(+), 11 deletions(-) diff --git a/pmd-netbeans/CHANGES.txt b/pmd-netbeans/CHANGES.txt index 0429a20f36..53fba14466 100644 --- a/pmd-netbeans/CHANGES.txt +++ b/pmd-netbeans/CHANGES.txt @@ -1,3 +1,6 @@ +Version 1.4 +- Updated pmd to version 3.4 + Version 1.3 - Updated pmd to version 3.3 - Works with IDE 5.0 diff --git a/pmd-netbeans/build.xml b/pmd-netbeans/build.xml index 29d0fc935b..db7f33b578 100644 --- a/pmd-netbeans/build.xml +++ b/pmd-netbeans/build.xml @@ -2,8 +2,8 @@ - - + + diff --git a/pmd-netbeans/libsrc/org/netbeans/modules/pmd/rules/ForeignBundleCodeRule.java b/pmd-netbeans/libsrc/org/netbeans/modules/pmd/rules/ForeignBundleCodeRule.java index ddc33e9c1c..8cb4794cff 100644 --- a/pmd-netbeans/libsrc/org/netbeans/modules/pmd/rules/ForeignBundleCodeRule.java +++ b/pmd-netbeans/libsrc/org/netbeans/modules/pmd/rules/ForeignBundleCodeRule.java @@ -93,10 +93,10 @@ public class ForeignBundleCodeRule extends AbstractRule { pN = (ASTClassOrInterfaceType)pRefT.jjtGetChild(0); } if (pN != null && !isCorrectClass (node, pN)) { - ctx.getReport().addRuleViolation(createRuleViolation( + addViolation( ctx, node /*child.getBeginLine()*/, - MessageFormat.format(getMessage(), new Object[] {pN.getImage()}))); + MessageFormat.format(getMessage(), new Object[] {pN.getImage()})); } } } diff --git a/pmd-netbeans/libsrc/org/netbeans/modules/pmd/rules/MissingPrivateInnerClassConstructorRule.java b/pmd-netbeans/libsrc/org/netbeans/modules/pmd/rules/MissingPrivateInnerClassConstructorRule.java index d3f83f3b30..90cd605d24 100644 --- a/pmd-netbeans/libsrc/org/netbeans/modules/pmd/rules/MissingPrivateInnerClassConstructorRule.java +++ b/pmd-netbeans/libsrc/org/netbeans/modules/pmd/rules/MissingPrivateInnerClassConstructorRule.java @@ -62,7 +62,7 @@ public class MissingPrivateInnerClassConstructorRule extends AbstractRule { }*/ if (!ok) { RuleContext ctx = (RuleContext)data; - ctx.getReport().addRuleViolation(createRuleViolation(ctx, node)); + addViolation(ctx, node); } return super.visit(node, data); diff --git a/pmd-netbeans/libsrc/org/netbeans/modules/pmd/rules/StaticBundleCodeRule.java b/pmd-netbeans/libsrc/org/netbeans/modules/pmd/rules/StaticBundleCodeRule.java index dd28ad28bf..36d9d058f3 100644 --- a/pmd-netbeans/libsrc/org/netbeans/modules/pmd/rules/StaticBundleCodeRule.java +++ b/pmd-netbeans/libsrc/org/netbeans/modules/pmd/rules/StaticBundleCodeRule.java @@ -73,7 +73,7 @@ public class StaticBundleCodeRule extends AbstractRule { } SimpleNode var = (SimpleNode)field.jjtGetChild(1).jjtGetChild(0); - ctx.getReport().addRuleViolation(createRuleViolation(ctx, field, MessageFormat.format(getMessage(), new Object[] {var.getImage()}))); + addViolation(ctx, field, MessageFormat.format(getMessage(), new Object[] {var.getImage()})); } } super.visit(node, data); diff --git a/pmd-netbeans/manifest.mf b/pmd-netbeans/manifest.mf index a0a05a7879..3ed377e464 100644 --- a/pmd-netbeans/manifest.mf +++ b/pmd-netbeans/manifest.mf @@ -1,5 +1,5 @@ Manifest-Version: 1.0 -OpenIDE-Module-Specification-Version: 1.3 +OpenIDE-Module-Specification-Version: 1.4 Created-By: Ole-Martin Mørk and Gunnlaugur Þór Briem and Radim Kubacki OpenIDE-Module: pmd OpenIDE-Module-Install: pmd/PMDInstall.class diff --git a/pmd-netbeans/nbproject/project.properties b/pmd-netbeans/nbproject/project.properties index 40416b211e..abf811859b 100644 --- a/pmd-netbeans/nbproject/project.properties +++ b/pmd-netbeans/nbproject/project.properties @@ -1,6 +1,6 @@ extra.module.files=\ modules/ext/jaxen-1.1-beta-7.jar \ - modules/ext/pmd-3.3.jar \ + modules/ext/pmd-3.4.jar \ modules/ext/jakarta-oro-2.0.jar \ modules/ext/nbpmdrules.jar nbm.distribution=http://pmd.sourceforge.net/ diff --git a/pmd-netbeans/nbproject/project.xml b/pmd-netbeans/nbproject/project.xml index 8a66c69d1e..cfd73fa446 100644 --- a/pmd-netbeans/nbproject/project.xml +++ b/pmd-netbeans/nbproject/project.xml @@ -20,9 +20,9 @@ - ext/pmd-3.3.jar + ext/pmd-3.4.jar - lib/pmd-3.3.jar + lib/pmd-3.4.jar @@ -150,7 +150,7 @@ libsrc - lib/pmd-3.3.jar + lib/pmd-3.4.jar build/libclasses ${cluster}/modules/ext/nbpmdrules.jar