1 19 20 package org.netbeans.modules.j2ee.sun.ide.j2ee.db; 21 22 23 import org.openide.util.HelpCtx; 24 import org.openide.util.NbBundle; 25 import org.openide.util.actions.CallableSystemAction; 26 27 28 29 33 public class StartAction extends CallableSystemAction { 34 35 36 public StartAction(){ 37 putValue("noIconInMenu", Boolean.TRUE); } 39 40 public String getName() { 41 return NbBundle.getMessage(StartAction.class, "LBL_StartAction"); 42 } 43 44 45 46 public HelpCtx getHelpCtx() { 47 return null; } 51 public boolean isEnabled() { 52 return (RegisterPointbase.getDefault().isRunning()==false); 53 } 54 55 public void performAction() { 56 if (RegisterPointbase.getDefault().isRegisterable() == false) { 57 org.netbeans.modules.j2ee.sun.ide.j2ee.ui.Util.showWarning( 58 NbBundle.getMessage(StartAction.class, "WRN_NO_DB_INSTANCE")); 59 return; 60 } 61 RegisterPointbase.getDefault().start(0); 63 } 64 protected boolean asynchronous() { 65 return true; 66 } 67 68 69 } 70 | Popular Tags |