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 import java.awt.*; 29 30 31 37 public class RefreshAction extends NodeAction { 38 39 private static final long serialVersionUID = 1; 40 41 protected boolean asynchronous() { 42 return false; 43 } 44 45 protected boolean enable(Node[] node) { 46 return true; 47 } 48 49 protected void performAction(Node[] node) { 50 BugList list = (BugList) BugsView.getCurrent().getList(); 51 if (list != null) { 52 list.refresh(); 53 } else { 54 Toolkit.getDefaultToolkit().beep(); 55 } 56 } 57 58 public String getName() { 59 return NbBundle.getMessage(RefreshAction.class, "Refresh"); } 61 62 67 68 public HelpCtx getHelpCtx() { 69 return HelpCtx.DEFAULT_HELP; 70 } 73 74 } 75 | Popular Tags |