1 19 20 package org.netbeans.modules.debugger.jpda.actions; 21 22 import java.util.Collections ; 23 import java.util.Set ; 24 import org.netbeans.api.debugger.ActionsManager; 25 26 27 import org.netbeans.spi.debugger.ContextProvider; 28 import org.netbeans.api.debugger.jpda.JPDADebugger; 29 import org.netbeans.modules.debugger.jpda.JPDADebuggerImpl; 30 31 32 37 public class KillActionProvider extends JPDADebuggerActionProvider { 38 39 40 public KillActionProvider (ContextProvider lookupProvider) { 41 super ( 42 (JPDADebuggerImpl) lookupProvider.lookupFirst 43 (null, JPDADebugger.class) 44 ); 45 } 46 47 public Set getActions () { 48 return Collections.singleton (ActionsManager.ACTION_KILL); 49 } 50 51 public void doAction (Object action) { 52 getDebuggerImpl ().finish (); 53 } 54 55 protected void checkEnabled (int debuggerState) { 56 setEnabled (ActionsManager.ACTION_KILL, true); 57 } 58 } 59 | Popular Tags |