1 19 package org.netbeans.modules.websvc.jaxrpc.actions; 20 21 import org.openide.util.actions.CookieAction; 22 import org.openide.util.HelpCtx; 23 import org.openide.util.NbBundle; 24 import org.openide.nodes.Node; 25 26 public class WSRegisterAction extends CookieAction { 27 public String getName() { 28 return NbBundle.getMessage(WSRegisterAction.class, "LBL_WSRegisterAction"); 29 } 30 31 public HelpCtx getHelpCtx() { 32 return HelpCtx.DEFAULT_HELP; 33 } 35 36 protected int mode() { 37 return MODE_EXACTLY_ONE; 38 } 39 40 protected Class [] cookieClasses() { 41 return new Class [] {}; 42 } 43 44 protected boolean asynchronous() { 45 return false; 46 } 47 48 protected boolean enable(Node[] activatedNodes) { 49 return activatedNodes.length == 1; 50 } 51 52 53 protected void performAction(Node[] activatedNodes) { 54 final WSRegisterCookie cookie = 55 (WSRegisterCookie)activatedNodes[0].getCookie(WSRegisterCookie.class); 56 if(cookie != null){ 57 cookie.registerWebService(); 58 } 59 } 60 } 61 | Popular Tags |