1 19 20 package org.netbeans.modules.tasklist.bugs; 21 22 import org.netbeans.modules.tasklist.core.TaskNode; 23 import org.openide.nodes.Node; 24 import org.openide.util.HelpCtx; 25 import org.openide.util.NbBundle; 26 import org.openide.util.actions.NodeAction; 27 28 29 32 public class ViewBugAction extends NodeAction { 33 34 private static final long serialVersionUID = 1; 35 36 protected boolean asynchronous() { 37 return false; 38 } 39 40 protected boolean enable(Node[] node) { 41 return ((node != null) && 42 (node.length == 1) && 43 (TaskNode.getTaskNode(node[0]) != null) && 44 (TaskNode.getTaskNode(node[0]) instanceof BugNode)); 45 } 46 47 protected void performAction(Node[] node) { 48 Bug bug = (Bug)TaskNode.getTask(node[0]); 49 bug.view(); 50 } 51 52 public String getName() { 53 return NbBundle.getMessage(ViewBugAction.class, "ViewBug"); } 55 56 61 62 public HelpCtx getHelpCtx() { 63 return HelpCtx.DEFAULT_HELP; 64 } 67 68 } 69 | Popular Tags |