01: package net.sourceforge.pmd.util.viewer.gui.menu;
02:
03: import net.sourceforge.pmd.ast.SimpleNode;
04: import net.sourceforge.pmd.util.viewer.model.ViewerModel;
05:
06: import javax.swing.*;
07:
08: /**
09: * context sensetive menu for the AST Panel
10: *
11: * @author Boris Gruschko ( boris at gruschko.org )
12: * @version $Id: ASTNodePopupMenu.java 4217 2006-02-10 14:15:31Z tomcopeland $
13: */
14: public class ASTNodePopupMenu extends JPopupMenu {
15: private ViewerModel model;
16: private SimpleNode node;
17:
18: public ASTNodePopupMenu(ViewerModel model, SimpleNode node) {
19: this .model = model;
20: this .node = node;
21: init();
22: }
23:
24: private void init() {
25: add(new SimpleNodeSubMenu(model, node));
26: addSeparator();
27: add(new AttributesSubMenu(model, node));
28: }
29: }
|