1 19 20 package org.netbeans.modules.debugger.jpda.ui.actions; 21 22 import java.beans.PropertyChangeEvent ; 23 import java.beans.PropertyChangeListener ; 24 import org.netbeans.api.debugger.jpda.JPDADebugger; 25 import org.netbeans.spi.debugger.ActionsProviderSupport; 26 27 28 34 abstract class JPDADebuggerAction extends ActionsProviderSupport implements 35 PropertyChangeListener { 36 37 private JPDADebugger debugger; 38 39 JPDADebuggerAction (JPDADebugger debugger) { 40 this.debugger = debugger; 41 debugger.addPropertyChangeListener (debugger.PROP_STATE, this); 42 } 43 44 public void propertyChange (PropertyChangeEvent evt) { 45 try { 46 checkEnabled (debugger.getState ()); 47 } catch (com.sun.jdi.VMDisconnectedException e) { 48 } 50 } 51 52 protected abstract void checkEnabled (int debuggerState); 53 54 JPDADebugger getDebuggerImpl () { 55 return debugger; 56 } 57 } 58 | Popular Tags |