public class RulerToggleBreakpointActionDelegate extends AbstractRulerActionDelegate implements IActionDelegate2
editorActions extension point.
This action is as a factory that creates another action that performs the
actual breakpoint toggling. The created action acts on the editor's
IToggleBreakpointsTagret to toggle breakpoints.
Following is example plug-in XML used to contribute this action to an editor. Note that the label attribute of this action is not displayed in the editor. Instead, the label of the created action is displayed.
<extension point="org.eclipse.ui.editorActions">
<editorContribution
targetID="example.editor"
id="example.rulerActions">
<action
label="Not Used"
class="org.eclipse.debug.ui.actions.RulerToggleBreakpointActionDelegate"
style="push"
actionID="RulerDoubleClick"
id="example.doubleClickBreakpointAction"/>
</editorContribution>
</extension>
This action can also be contributed to a vertical ruler context menu via the
popupMenus extension point, by referencing the ruler's context
menu identifier in the targetID attribute.
<extension point="org.eclipse.ui.popupMenus">
<viewerContribution
targetID="example.rulerContextMenuId"
id="example.RulerPopupActions">
<action
label="Toggle Breakpoint"
class="org.eclipse.debug.ui.actions.RulerToggleBreakpointActionDelegate"
menubarPath="additions"
id="example.rulerContextMenu.toggleBreakpointAction">
</action>
</viewerContribution>
Clients may refer to this class as an action delegate in plug-in XML. This class is not intended to be subclassed.
| Constructor and Description |
|---|
RulerToggleBreakpointActionDelegate() |
| Modifier and Type | Method and Description |
|---|---|
protected IAction |
createAction(ITextEditor editor,
IVerticalRulerInfo rulerInfo)
The factory method creating the underlying action.
|
void |
dispose()
The
ActionDelegate implementation of this
IActionDelegate2 method does nothing. |
void |
init(IAction action)
The
ActionDelegate implementation of this
IActionDelegate2 method does nothing. |
void |
runWithEvent(IAction action,
Event event)
The
ActionDelegate implementation of this
IActionDelegate2 method redirects to the run
method. |
void |
setActiveEditor(IAction callerAction,
IEditorPart targetEditor)
Sets the active editor for the delegate.
|
menuAboutToShow, mouseDoubleClick, mouseDown, mouseUp, run, selectionChangedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitrun, selectionChangedprotected IAction createAction(ITextEditor editor, IVerticalRulerInfo rulerInfo)
AbstractRulerActionDelegatecreateAction in class AbstractRulerActionDelegateeditor - the editor the action to be created will work onrulerInfo - the vertical ruler the action to be created will work onpublic void setActiveEditor(IAction callerAction, IEditorPart targetEditor)
IEditorActionDelegatesetActiveEditor in interface IEditorActionDelegatesetActiveEditor in class AbstractRulerActionDelegatecallerAction - the action proxy that handles presentation portion of the actiontargetEditor - the new editor targetpublic void init(IAction action)
ActionDelegateActionDelegate implementation of this
IActionDelegate2 method does nothing. Subclasses may
reimplement.init in interface IActionDelegate2init in class ActionDelegateaction - the proxy action that handles the presentation portion of
the action.public void dispose()
ActionDelegateActionDelegate implementation of this
IActionDelegate2 method does nothing. Subclasses may
reimplement.dispose in interface IActionDelegate2dispose in class ActionDelegatepublic void runWithEvent(IAction action, Event event)
ActionDelegateActionDelegate implementation of this
IActionDelegate2 method redirects to the run
method. Subclasses may reimplement.runWithEvent in interface IActionDelegate2runWithEvent in class AbstractRulerActionDelegateaction - the action proxy that handles the presentation portion of
the actionevent - the SWT event which triggered this action being runGuidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.