1 19 20 package org.netbeans.modules.debugger.jpda.ui.actions; 21 22 import javax.swing.JCheckBoxMenuItem ; 23 import javax.swing.JMenuItem ; 24 import org.openide.util.HelpCtx; 25 import org.openide.util.NbBundle; 26 import org.openide.util.actions.BooleanStateAction; 27 import org.openide.util.actions.NodeAction; 28 29 import org.netbeans.api.debugger.jpda.LineBreakpoint; 30 31 32 37 public class BreakpointEnableAction extends BooleanStateAction { 38 39 public boolean isEnabled() { 40 LineBreakpoint lb = LineBreakpointCustomizeAction.getCurrentBreakpoint(); 41 if (lb != null) { 42 boolean value = lb.isEnabled(); 43 super.setBooleanState(value); 44 return true; 45 } 46 return false; 47 } 48 49 public String getName() { 50 return NbBundle.getMessage(BreakpointEnableAction.class, "CTL_enabled"); 51 } 52 53 public void setBooleanState(boolean value) { 54 LineBreakpoint lb = LineBreakpointCustomizeAction.getCurrentBreakpoint(); 55 if (value) { 56 lb.enable(); 57 } else { 58 lb.disable(); 59 } 60 super.setBooleanState(value); 61 } 62 63 public HelpCtx getHelpCtx() { 64 return null; 65 } 66 67 } 68 | Popular Tags |