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
This commit is contained in:
David Craine
2002-07-16 14:53:08 +00:00
parent c56d452766
commit d85ba7f1b4

View File

@ -78,7 +78,11 @@ public class PMDOpenTool {
private static void registerWithProjectView() { private static void registerWithProjectView() {
ContextActionProvider cap = new ContextActionProvider() { ContextActionProvider cap = new ContextActionProvider() {
public Action getContextAction (Browser browser, Node[] nodes) { 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); ProjectView.registerContextActionProvider(cap);