1 19 20 package org.netbeans.modules.j2ee.earproject.ui; 21 22 import org.openide.util.HelpCtx; 23 import org.openide.util.NbBundle; 24 import org.openide.util.actions.NodeAction; 25 26 30 public class RemoveAction extends NodeAction { 31 32 public String getName() { 33 return NbBundle.getMessage(this.getClass(), "LBL_RemoveAction"); 34 } 35 36 public HelpCtx getHelpCtx() { 37 return HelpCtx.DEFAULT_HELP; 38 } 39 40 protected boolean asynchronous() { 41 return false; 42 } 43 44 protected boolean enable(org.openide.nodes.Node[] activatedNodes) { 45 return activatedNodes.length >= 0; 46 } 47 48 protected void performAction(org.openide.nodes.Node[] activatedNodes) { 49 ModuleNode n = null; 50 for (int i = 0; i < activatedNodes.length; i++) { 51 n = (ModuleNode) activatedNodes[i].getCookie(ModuleNode.class); 52 n.removeFromJarContent(); 53 } 54 } 55 56 } 57 | Popular Tags |