1 19 20 package org.netbeans.modules.websvc.dev.wizard; 21 22 import javax.swing.Action ; 23 import org.netbeans.modules.j2ee.spi.ejbjar.EjbNodesFactory; 24 import org.openide.nodes.Children; 25 import org.openide.nodes.FilterNode; 26 import org.openide.nodes.Node; 27 28 29 33 public class EjbChildren extends Children.Array { 34 private Node projectNode; 35 36 37 public EjbChildren(Node projectNode) { 38 this.projectNode = projectNode; 39 } 40 41 protected void addNotify() { 42 super.addNotify(); 43 Node ejbsNode = projectNode.getChildren().findChild(EjbNodesFactory.CONTAINER_NODE_NAME); 44 Node[] ejbNodes = ejbsNode.getChildren().getNodes(true); 46 Node[] filteredNodes = new Node[ejbNodes.length]; 47 for (int i =0; i < ejbNodes.length; i++) { 48 filteredNodes[i] = new FilterNode(ejbNodes[i], Children.LEAF) { 49 public Action [] getActions(boolean context) { 50 return new Action [0]; 51 } 52 }; 53 } 54 add(filteredNodes); 55 } 56 57 } 58 | Popular Tags |