1 19 20 package org.netbeans.core.actions; 21 22 import org.openide.LifecycleManager; 23 import org.openide.util.HelpCtx; 24 import org.openide.util.actions.CallableSystemAction; 25 import org.openide.util.NbBundle; 26 import org.openide.util.RequestProcessor; 27 28 32 public class SystemExit extends CallableSystemAction implements Runnable { 33 34 35 private static final long serialVersionUID = 5198683109749927396L; 36 37 41 public String getName() { 42 return NbBundle.getBundle(SystemExit.class).getString("Exit"); 43 } 44 45 48 public HelpCtx getHelpCtx() { 49 return new HelpCtx (SystemExit.class); 50 } 51 52 protected boolean asynchronous() { 53 return false; 55 } 56 57 public void performAction() { 58 RequestProcessor.getDefault().post(this); 60 } 61 62 63 public void run() { 64 LifecycleManager.getDefault().exit(); 65 } 66 67 protected void initialize() { 68 super.initialize(); 69 putValue("noIconInMenu", Boolean.TRUE); } 71 72 } 73 | Popular Tags |