protected void appendSuspendPolicy(IJavaBreakpoint breakpoint, StringBuffer buffer) throws CoreException { if (breakpoint.getSuspendPolicy() == IJavaBreakpoint.SUSPEND_VM) { buffer.append(' '); buffer.append(DebugUIMessages.JDIModelPresentation_Suspend_VM); } }
/** * @see BreakpointToggleAction#doAction(IJavaBreakpoint) */ public void doAction(IJavaBreakpoint breakpoint) throws CoreException { if(breakpoint.getSuspendPolicy() != fCurrentPolicy) { breakpoint.setSuspendPolicy(fCurrentPolicy); } }
/** * @see IActionDelegate#selectionChanged(IAction, ISelection) */ public void update(IAction action, IJavaBreakpoint breakpoint) { try { if (breakpoint.getSuspendPolicy() == IJavaBreakpoint.SUSPEND_THREAD) { action.setText(ActionMessages.BreakpointSuspendPolicy_Suspend__VM_1); fCurrentPolicy = IJavaBreakpoint.SUSPEND_VM; } else { action.setText(ActionMessages.BreakpointSuspendPolicy_Suspend__Thread_2); fCurrentPolicy = IJavaBreakpoint.SUSPEND_THREAD; } } catch (CoreException e) { JDIDebugUIPlugin.log(e); } } }
/** * Constructor * @param breakpoint * @throws CoreException */ public BreakpointChange(IJavaBreakpoint breakpoint) throws CoreException { fBreakpoint = breakpoint; fTypeName = breakpoint.getTypeName(); fHitCount = breakpoint.getHitCount(); fInstanceFilters = breakpoint.getInstanceFilters(); fSuspendPolicy = breakpoint.getSuspendPolicy(); fThreadFilters = breakpoint.getThreadFilters(); fEnabled = breakpoint.isEnabled(); }
/** * Creates the editor for configuring the suspend policy (suspend * VM or suspend thread) of the breakpoint. * @param parent the composite in which the suspend policy * editor will be created. */ private void createSuspendPolicyEditor(Composite parent) throws CoreException { Composite comp = createComposite(parent, 2); createLabel(comp, PropertyPageMessages.JavaBreakpointPage_6); boolean suspendThread= getBreakpoint().getSuspendPolicy() == IJavaBreakpoint.SUSPEND_THREAD; fSuspendPolicy = new Combo(comp, SWT.BORDER | SWT.READ_ONLY); fSuspendPolicy.add(PropertyPageMessages.JavaBreakpointPage_7); fSuspendPolicy.add(PropertyPageMessages.JavaBreakpointPage_8); fSuspendPolicy.select(1); if(suspendThread) { fSuspendPolicy.select(0); } }