1 19 20 package org.netbeans.modules.websvc.registry.actions; 21 22 import org.openide.nodes.Node; 23 import org.netbeans.modules.websvc.registry.model.WebServiceGroup; 24 import org.netbeans.modules.websvc.registry.model.WebServiceListModel; 25 import org.netbeans.modules.websvc.registry.ui.AddWebServiceDlg; 26 import org.openide.util.actions.NodeAction; 27 import org.openide.util.*; 28 29 30 34 public class AddWebServiceAction extends NodeAction { 35 36 WebServiceListModel wsListModel = WebServiceListModel.getInstance(); 37 38 protected boolean enable(org.openide.nodes.Node[] node) { 39 return true; 40 } 41 42 public org.openide.util.HelpCtx getHelpCtx() { 43 return HelpCtx.DEFAULT_HELP; 44 } 45 46 public String getName() { 47 return NbBundle.getMessage(AddWebServiceAction.class, "ADD_WEB_SERVICE"); 48 } 49 50 protected void performAction(Node[] nodes) { 51 54 Node activatedNode = null; 58 if(nodes != null && nodes.length > 0) { 59 activatedNode = nodes[0]; 60 } 61 62 AddWebServiceDlg dlg = new AddWebServiceDlg(true, activatedNode); 63 dlg.displayDialog(); 64 } 65 66 67 protected boolean asynchronous() { 68 return false; 69 } 70 } 71 | Popular Tags |