1 package net.sourceforge.pmd.util.viewer.gui.menu; 2 3 import net.sourceforge.pmd.ast.SimpleNode; 4 import net.sourceforge.pmd.util.viewer.model.ViewerModel; 5 6 import javax.swing.*; 7 8 /*** 9 * context sensetive menu for the AST Panel 10 * 11 * @author Boris Gruschko ( boris at gruschko.org ) 12 * @version $Id: ASTNodePopupMenu.java,v 1.9 2006/02/10 14:15:31 tomcopeland Exp $ 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 }