Class JavaBreakpointConditionEditor
true or when the value of the
conditional expression changes).
The controls are intended to be embedded in a composite provided by the client - for
example, in a dialog. Clients must call createControl(Composite) as the first
life cycle method after instantiation. Clients may then call setInput(Object)
with the breakpoint object to be displayed/edited. Changes are not applied to the
breakpoint until doSave() is called. The method isDirty() may be used
to determine if any changes have been made in the editor, and getStatus() may
be used to determine if the editor settings are valid. Clients can register for
property change notification (addPropertyListener(IPropertyListener)). The editor
will fire a property change each time a setting is modified. The same editor can be
used to display different breakpoints by calling setInput(Object) with different
breakpoint objects.
- Since:
- 3.5
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intProperty id for breakpoint condition expression.static final intProperty id for breakpoint condition enabled state.static final intProperty id for breakpoint condition suspend policy. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new Java breakpoint condition editor.JavaBreakpointConditionEditor(org.eclipse.jface.dialogs.IDialogSettings dialogSettings) Creates a new Java breakpoint condition editor with a history drop-down list. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPropertyListener(org.eclipse.ui.IPropertyListener listener) Adds the given property listener to this editor.org.eclipse.swt.widgets.ControlcreateControl(org.eclipse.swt.widgets.Composite parent) Creates the condition editor widgets and returns the top level control.protected voiddispose()Disposes this editor and its controls.voiddoSave()Saves current settings to the breakpoint being edited.getInput()Returns the breakpoint being edited ornullif none.org.eclipse.core.runtime.IStatusReturns a status describing whether the condition editor is in a valid state.booleanisDirty()Returns whether the editor needs saving.voidremovePropertyListener(org.eclipse.ui.IPropertyListener listener) Removes the property listener from this editor.voidsetFocus()Gives focus to an appropriate control in the editor.voidSets the breakpoint to editor ornullif none.voidsetMnemonics(boolean mnemonics) Sets whether mnemonics should be displayed in editor controls.voidsetResumeOnHit(boolean resume) Set "Resume on hit" flagvoidUpdate label values in Condition editor for trigger points that resume on hitvoidUpdate label values in Condition editor for suspending breakpointsMethods inherited from class org.eclipse.jdt.internal.debug.ui.breakpoints.AbstractJavaBreakpointEditor
firePropertyChange, isMnemonics, processMnemonics, setDirty, setDirty, suppressPropertyChanges
-
Field Details
-
PROP_CONDITION
public static final int PROP_CONDITIONProperty id for breakpoint condition expression.- See Also:
-
PROP_CONDITION_ENABLED
public static final int PROP_CONDITION_ENABLEDProperty id for breakpoint condition enabled state.- See Also:
-
PROP_CONDITION_SUSPEND_POLICY
public static final int PROP_CONDITION_SUSPEND_POLICYProperty id for breakpoint condition suspend policy.- See Also:
-
-
Constructor Details
-
JavaBreakpointConditionEditor
public JavaBreakpointConditionEditor()Creates a new Java breakpoint condition editor. -
JavaBreakpointConditionEditor
public JavaBreakpointConditionEditor(org.eclipse.jface.dialogs.IDialogSettings dialogSettings) Creates a new Java breakpoint condition editor with a history drop-down list.- Parameters:
dialogSettings- the dialog settings for the condition history ornullto use the default settings (i.e. those used by JDT Debug)- Since:
- 3.6
-
-
Method Details
-
addPropertyListener
public void addPropertyListener(org.eclipse.ui.IPropertyListener listener) Adds the given property listener to this editor. Property changes are reported on the breakpoint being edited. Property identifiers are breakpoint attribute keys.- Overrides:
addPropertyListenerin classorg.eclipse.jdt.internal.debug.ui.breakpoints.AbstractJavaBreakpointEditor- Parameters:
listener- listener
-
removePropertyListener
public void removePropertyListener(org.eclipse.ui.IPropertyListener listener) Removes the property listener from this editor.- Overrides:
removePropertyListenerin classorg.eclipse.jdt.internal.debug.ui.breakpoints.AbstractJavaBreakpointEditor- Parameters:
listener- listener
-
setInput
Sets the breakpoint to editor ornullif none.- Specified by:
setInputin classorg.eclipse.jdt.internal.debug.ui.breakpoints.AbstractJavaBreakpointEditor- Parameters:
input- breakpoint ornull- Throws:
org.eclipse.core.runtime.CoreException- if unable to access breakpoint attributes
-
createControl
public org.eclipse.swt.widgets.Control createControl(org.eclipse.swt.widgets.Composite parent) Creates the condition editor widgets and returns the top level control.- Specified by:
createControlin classorg.eclipse.jdt.internal.debug.ui.breakpoints.AbstractJavaBreakpointEditor- Parameters:
parent- composite to embed the editor controls in- Returns:
- top level control
-
dispose
protected void dispose()Disposes this editor and its controls. Once disposed, the editor can no longer be used.- Overrides:
disposein classorg.eclipse.jdt.internal.debug.ui.breakpoints.AbstractJavaBreakpointEditor
-
setFocus
public void setFocus()Gives focus to an appropriate control in the editor.- Specified by:
setFocusin classorg.eclipse.jdt.internal.debug.ui.breakpoints.AbstractJavaBreakpointEditor
-
doSave
public void doSave() throws org.eclipse.core.runtime.CoreExceptionSaves current settings to the breakpoint being edited. Has no effect if a breakpoint is not currently being edited or if this editor is not dirty.- Specified by:
doSavein classorg.eclipse.jdt.internal.debug.ui.breakpoints.AbstractJavaBreakpointEditor- Throws:
org.eclipse.core.runtime.CoreException- if unable to update the breakpoint.
-
getStatus
public org.eclipse.core.runtime.IStatus getStatus()Returns a status describing whether the condition editor is in a valid state. Returns an OK status when all is good. For example, an error status is returned when the conditional expression is empty but enabled.- Specified by:
getStatusin classorg.eclipse.jdt.internal.debug.ui.breakpoints.AbstractJavaBreakpointEditor- Returns:
- editor status.
-
isDirty
public boolean isDirty()Returns whether the editor needs saving.- Overrides:
isDirtyin classorg.eclipse.jdt.internal.debug.ui.breakpoints.AbstractJavaBreakpointEditor- Returns:
- whether the editor needs saving
-
setMnemonics
public void setMnemonics(boolean mnemonics) Sets whether mnemonics should be displayed in editor controls. Only has an effect if set beforecreateControl(Composite)is called. By default, mnemonics are displayed.- Overrides:
setMnemonicsin classorg.eclipse.jdt.internal.debug.ui.breakpoints.AbstractJavaBreakpointEditor- Parameters:
mnemonics- whether to display mnemonics
-
getInput
Returns the breakpoint being edited ornullif none.- Specified by:
getInputin classorg.eclipse.jdt.internal.debug.ui.breakpoints.AbstractJavaBreakpointEditor- Returns:
- breakpoint or
null
-
updateConditionTextOnResume
public void updateConditionTextOnResume()Update label values in Condition editor for trigger points that resume on hit- Since:
- 3.15
-
updateConditionTextOnSuspend
public void updateConditionTextOnSuspend()Update label values in Condition editor for suspending breakpoints- Since:
- 3.15
-
setResumeOnHit
public void setResumeOnHit(boolean resume) Set "Resume on hit" flag- Since:
- 3.15
- See Also:
-