1 19 20 package org.netbeans.modules.websvc.core.webservices.action; 21 22 import org.openide.nodes.Node; 23 import org.openide.util.HelpCtx; 24 import org.openide.util.NbBundle; 25 import org.openide.util.actions.CookieAction; 26 27 30 public class ConfigureHandlerAction extends CookieAction{ 31 32 33 public ConfigureHandlerAction() { 34 } 35 36 public String getName() { 37 return NbBundle.getMessage(ConfigureHandlerAction.class, "LBL_ConfigureHandlerAction"); 38 } 39 40 public HelpCtx getHelpCtx() { 41 return HelpCtx.DEFAULT_HELP; 42 43 } 44 45 protected int mode() { 46 return MODE_EXACTLY_ONE; 47 } 48 49 protected Class [] cookieClasses() { 50 return new Class [] {}; 51 } 52 53 protected boolean asynchronous() { 54 return false; 55 } 56 57 protected boolean enable(Node[] activatedNodes) { 58 return activatedNodes.length == 1; 59 } 60 61 62 protected void performAction(Node[] activatedNodes) { 63 final ConfigureHandlerCookie cookie = 64 (ConfigureHandlerCookie)activatedNodes[0].getCookie(ConfigureHandlerCookie.class); 65 if(cookie != null){ 66 cookie.configureHandler(); 67 } 68 69 } 70 71 } 72 | Popular Tags |