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:
@ -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);
|
||||||
|
Reference in New Issue
Block a user