From d85ba7f1b4695aac6d6676b34599cc4ea4dc421b Mon Sep 17 00:00:00 2001 From: David Craine Date: Tue, 16 Jul 2002 14:53:08 +0000 Subject: [PATCH] Updated so that the PMD Check Project menu option only occurs on the PackageNode and JBProecjt Node git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@373 51baf565-9d33-0410-a72c-fc3788e3496d --- .../src/net/sourceforge/pmd/jbuilder/PMDOpenTool.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pmd-jbuilder/src/net/sourceforge/pmd/jbuilder/PMDOpenTool.java b/pmd-jbuilder/src/net/sourceforge/pmd/jbuilder/PMDOpenTool.java index 0d6e0f51bc..d4212d88b7 100644 --- a/pmd-jbuilder/src/net/sourceforge/pmd/jbuilder/PMDOpenTool.java +++ b/pmd-jbuilder/src/net/sourceforge/pmd/jbuilder/PMDOpenTool.java @@ -78,7 +78,11 @@ public class PMDOpenTool { private static void registerWithProjectView() { ContextActionProvider cap = new ContextActionProvider() { public Action getContextAction (Browser browser, Node[] nodes) { - return ACTION_PMDProjectCheck; + //Browser.getActiveBrowser().getMessageView().addMessage(msgCat, browser.getProjectView().getSelectedNode().toString()); + Node node = browser.getProjectView().getSelectedNode(); + if (node instanceof JBProject || node instanceof PackageNode) + return ACTION_PMDProjectCheck; + return null; } }; ProjectView.registerContextActionProvider(cap);