1 19 package org.netbeans.modules.j2ee.sun.bridge.apis; 20 21 import org.openide.nodes.Node; 22 import org.openide.util.HelpCtx; 23 import org.openide.util.NbBundle; 24 import org.openide.util.actions.CookieAction; 25 26 30 public class RefreshAction extends CookieAction { 31 32 protected Class [] cookieClasses() { 33 return new Class [] {}; 34 } 35 36 protected int mode() { 37 return MODE_EXACTLY_ONE; 38 } 39 40 protected void performAction(Node[] nodes) { 41 if( (nodes == null) || (nodes.length < 1) ) { 42 return ; 43 } 44 45 try { 46 RefreshCookie refreshAction = 47 (RefreshCookie)nodes[0].getCookie(RefreshCookie.class); 48 if (refreshAction != null) { 49 refreshAction.refresh(); 50 } 51 } catch(java.lang.RuntimeException rex) { 52 } 54 55 } 56 57 public String getName() { 58 return NbBundle.getMessage(RefreshAction.class, "LBL_RefreshAction"); 59 } 60 61 protected String iconResource() { 62 return "org/netbeans/modules/j2ee/sun/ide/resources/AddInstanceActionIcon.gif"; 63 } 64 65 public HelpCtx getHelpCtx() { 66 return HelpCtx.DEFAULT_HELP; 67 } 70 71 protected boolean enable(Node[] nodes) { 72 return true; 73 } 74 75 protected boolean asynchronous() { 76 return false; 77 } 78 79 80 } 81 | Popular Tags |