diff --git a/pmd-eclipse/.classpath b/pmd-eclipse/.classpath index 37ac45104b..ee1f452e9d 100644 --- a/pmd-eclipse/.classpath +++ b/pmd-eclipse/.classpath @@ -14,6 +14,6 @@ - + diff --git a/pmd-eclipse/plugin.xml b/pmd-eclipse/plugin.xml index b7556a9016..0188ecc16e 100644 --- a/pmd-eclipse/plugin.xml +++ b/pmd-eclipse/plugin.xml @@ -10,7 +10,7 @@ - + @@ -65,6 +65,12 @@ class="net.sourceforge.pmd.eclipse.preferences.PMDPreferencePage" id="net.sourceforge.pmd.eclipse.preferences.PMDPreferencePage"> + + @@ -89,6 +95,27 @@ id="net.sourceforge.pmd.eclipse.PMDCheckFileActionItem"> + + + + + + + + diff --git a/pmd-eclipse/src/net/sourceforge/pmd/eclipse/PMDVisitor.java b/pmd-eclipse/src/net/sourceforge/pmd/eclipse/PMDVisitor.java index cb8cb67cb9..7463d65f7b 100644 --- a/pmd-eclipse/src/net/sourceforge/pmd/eclipse/PMDVisitor.java +++ b/pmd-eclipse/src/net/sourceforge/pmd/eclipse/PMDVisitor.java @@ -99,8 +99,9 @@ public class PMDVisitor implements IResourceVisitor { (((IFile) resource).getFileExtension() != null) && ((IFile) resource).getFileExtension().equals("java")) { runPMD( (IFile) resource ); - return false; - } else { + return false; + } + else { return true; } } diff --git a/pmd-eclipse/src/net/sourceforge/pmd/eclipse/actions/PMDCheckFileAction.java b/pmd-eclipse/src/net/sourceforge/pmd/eclipse/actions/PMDCheckFileAction.java index 6f27f3e8d8..0d32a8720e 100644 --- a/pmd-eclipse/src/net/sourceforge/pmd/eclipse/actions/PMDCheckFileAction.java +++ b/pmd-eclipse/src/net/sourceforge/pmd/eclipse/actions/PMDCheckFileAction.java @@ -35,9 +35,6 @@ public class PMDCheckFileAction implements IObjectActionDelegate { */ public void run(IAction action) { String[] rulesetFiles = PMDPlugin.getDefault().getRuleSetsPreference(); - - Shell shell = new Shell(); - PMDVisitor visitor = null; try { visitor = new PMDVisitor(rulesetFiles); @@ -49,13 +46,10 @@ public class PMDCheckFileAction implements IObjectActionDelegate { if (obj instanceof IFile) { ((IFile)obj).accept(visitor); } - } } - - //PMDPlugin.getWorkspace().getRoot().accept( visitor ); - - } catch (Exception e) { + } + catch (Exception e) { e.printStackTrace(); }