diff --git a/pmd-jedit/config/pmd.props b/pmd-jedit/config/pmd.props index 1991749aa0..578457cb02 100644 --- a/pmd-jedit/config/pmd.props +++ b/pmd-jedit/config/pmd.props @@ -6,23 +6,26 @@ plugin.net.sourceforge.pmd.jedit.PMDJEditPlugin.author=Jiger Patel, Tom Copeland plugin.net.sourceforge.pmd.jedit.PMDJEditPlugin.version=2.2 plugin.net.sourceforge.pmd.jedit.PMDJEditPlugin.docs=jedit.html plugin.net.sourceforge.pmd.jedit.PMDJEditPlugin.depend.0=jdk 1.3 -plugin.net.sourceforge.pmd.jedit.PMDJEditPlugin.depend.1=jedit 04.00.99.00 +plugin.net.sourceforge.pmd.jedit.PMDJEditPlugin.depend.1=jedit 04.02.01.00 plugin.net.sourceforge.pmd.jedit.PMDJEditPlugin.depend.2=plugin errorlist.ErrorListPlugin 1.2 plugin.net.sourceforge.pmd.jedit.PMDJEditPlugin.jars=pmd-1.2.1.jar jaxen-core-1.0-fcs.jar saxpath-1.0-fcs.jar pmd-swingui-0.1.jar # # Menu properties # -pmd-menu=pmd-check-current-buffer pmd-check-all-open-buffers pmd-check-current-directory pmd-check-current-directory-recursively pmd-clear-errorlist %pmd-cpd -pmd-cpd=cpd-currentfile cpd-dir cpd-dir-recursively -pmd-menu.label=$PMD +#New jEdit 4.2 properties +plugin.net.sourceforge.pmd.jedit.PMDJEditPlugin.activate=defer + +plugin.net.sourceforge.pmd.jedit.PMDJEditPlugin.menu.label=$PMD + +plugin.net.sourceforge.pmd.jedit.PMDJEditPlugin.menu=pmd-check-current-buffer pmd-check-all-open-buffers pmd-check-current-directory pmd-check-current-directory-recursively pmd-clear-errorlist %pmd-cpd pmd-cpd=cpd-currentfile cpd-dir cpd-dir-recursively + pmd-check-current-buffer.label=Check current buffer pmd-check-all-open-buffers.label=Check all open buffers pmd-check-current-directory.label=Check all files in current directory pmd-check-current-directory-recursively.label=Check directory recursively pmd-clear-errorlist.label=Clear ErrorList - pmd-cpd.label=Detect Duplicate Code cpd-currentfile.label=In Current File cpd-dir.label=In Directory @@ -30,8 +33,10 @@ cpd-dir-recursively.label=In Directory Recursively # # Option pane properties # -options.PMD.title=PMD -options.PMD.label=PMD + +plugin.net.sourceforge.pmd.jedit.PMDJEditPlugin.option-pane=pmd +options.pmd.label=PMD +options.pmd.code=new net.sourceforge.pmd.jedit.PMDOptionPane() #Dockables properties. cpd-viewer.title=Copy/Paste Detector diff --git a/pmd-jedit/etc/build.xml b/pmd-jedit/etc/build.xml index a5241394c0..207178dbc0 100644 --- a/pmd-jedit/etc/build.xml +++ b/pmd-jedit/etc/build.xml @@ -1,5 +1,6 @@ + diff --git a/pmd-jedit/src/net/sourceforge/pmd/jedit/PMDJEditPlugin.java b/pmd-jedit/src/net/sourceforge/pmd/jedit/PMDJEditPlugin.java index 028dd00e38..721fd97f32 100644 --- a/pmd-jedit/src/net/sourceforge/pmd/jedit/PMDJEditPlugin.java +++ b/pmd-jedit/src/net/sourceforge/pmd/jedit/PMDJEditPlugin.java @@ -69,13 +69,13 @@ public class PMDJEditPlugin extends EditPlugin { ErrorSource.registerErrorSource(errorSource); } - public void createMenuItems(Vector menuItems) { +/* public void createMenuItems(Vector menuItems) { menuItems.addElement(GUIUtilities.loadMenu("pmd-menu")); } public void createOptionPanes(OptionsDialog optionsDialog) { optionsDialog.addOptionPane(new PMDOptionPane()); - } + } */ // boilerplate JEdit code public static void checkDirectory(View view) { @@ -141,16 +141,17 @@ public class PMDJEditPlugin extends EditPlugin { } public void instanceCheckDirectoryRecursively(View view) { - if (jEdit.getBooleanProperty(PMDJEditPlugin.OPTION_UI_DIRECTORY_POPUP)) + if (jEdit.getBooleanProperty(PMDJEditPlugin.OPTION_UI_DIRECTORY_POPUP)) { final String dir = JOptionPane.showInputDialog(jEdit.getFirstView(), "Please type in a directory to scan recursively", NAME, JOptionPane.QUESTION_MESSAGE); - if (dir != null) + if (dir != null && dir.trim() != null) { if (!(new File(dir)).exists() || !(new File(dir)).isDirectory() ) { JOptionPane.showMessageDialog(jEdit.getFirstView(), dir + " is not a valid directory name", NAME, JOptionPane.ERROR_MESSAGE); return; } process(findFiles(dir, true)); + } } else diff --git a/pmd-jedit/src/net/sourceforge/pmd/jedit/SelectedRules.java b/pmd-jedit/src/net/sourceforge/pmd/jedit/SelectedRules.java index cec7683c1a..6a84e70269 100644 --- a/pmd-jedit/src/net/sourceforge/pmd/jedit/SelectedRules.java +++ b/pmd-jedit/src/net/sourceforge/pmd/jedit/SelectedRules.java @@ -58,6 +58,8 @@ public class SelectedRules //Load custom RuleSets if any. String customRuleSetPath = jEdit.getProperty("pmd.customRulesPath"); + + System.out.println("See custom rules path " + customRuleSetPath); if(!(customRuleSetPath == null)) { StringTokenizer strtok = new StringTokenizer(customRuleSetPath, ",");