1 19 package org.openide.actions; 20 21 import org.openide.nodes.Node; 22 import org.openide.nodes.NodeOperation; 23 import org.openide.util.HelpCtx; 24 import org.openide.util.NbBundle; 25 import org.openide.util.actions.NodeAction; 26 27 28 32 public final class OpenLocalExplorerAction extends NodeAction { 33 protected void performAction(Node[] activatedNodes) { 34 NodeOperation.getDefault().explore(activatedNodes[0]); 35 } 36 37 protected boolean asynchronous() { 38 return false; 39 } 40 41 protected boolean enable(Node[] activatedNodes) { 42 if ((activatedNodes == null) || (activatedNodes.length != 1) || (activatedNodes[0].isLeaf())) { 43 return false; 44 } 45 46 return true; 47 } 48 49 public String getName() { 50 return NbBundle.getMessage(OpenLocalExplorerAction.class, "OpenLocalExplorer"); 51 } 52 53 public HelpCtx getHelpCtx() { 54 return new HelpCtx(OpenLocalExplorerAction.class); 55 } 56 57 protected String iconResource() { 58 return "org/openide/resources/actions/openLocalExplorer.gif"; } 60 } 61 | Popular Tags |