Package org.eclipse.ui.texteditor
Class AbstractRulerActionDelegate
java.lang.Object
org.eclipse.ui.actions.ActionDelegate
org.eclipse.ui.texteditor.AbstractRulerActionDelegate
- All Implemented Interfaces:
EventListener
,IMenuListener
,MouseListener
,SWTEventListener
,IActionDelegate
,IActionDelegate2
,IEditorActionDelegate
- Direct Known Subclasses:
BookmarkRulerAction
,RulerEnableDisableBreakpointActionDelegate
,RulerRunToLineActionDelegate
,RulerToggleBreakpointActionDelegate
,SelectRulerAction
,TaskRulerAction
public abstract class AbstractRulerActionDelegate
extends ActionDelegate
implements IEditorActionDelegate, MouseListener, IMenuListener
This class serves as an adapter for actions contributed to the vertical ruler's
context menu. This adapter provides the contributed actions access to their editor
and the editor's vertical ruler. These actions gain only limited access to the vertical
ruler as defined by
IVerticalRulerInfo
. The adapter updates the
adapter (inner) action on menu and mouse action on the vertical ruler.
Extending classes must implement the factory method
createAction(ITextEditor editor, IVerticalRulerInfo)
.
- Since:
- 2.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract IAction
createAction
(ITextEditor editor, IVerticalRulerInfo rulerInfo) The factory method creating the underlying action.void
menuAboutToShow
(IMenuManager manager) Notifies this listener that the menu is about to be shown by the given menu manager.void
Sent when a mouse button is pressed twice within the (operating system specified) double click period.void
Sent when a mouse button is pressed.void
Sent when a mouse button is released.void
TheActionDelegate
implementation of thisIActionDelegate
method does nothing.void
runWithEvent
(IAction action, Event event) TheActionDelegate
implementation of thisIActionDelegate2
method redirects to therun
method.void
selectionChanged
(IAction action, ISelection selection) TheActionDelegate
implementation of thisIActionDelegate
method does nothing.void
setActiveEditor
(IAction callerAction, IEditorPart targetEditor) Sets the active editor for the delegate.Methods inherited from class org.eclipse.ui.actions.ActionDelegate
dispose, init
-
Constructor Details
-
AbstractRulerActionDelegate
public AbstractRulerActionDelegate()
-
-
Method Details
-
createAction
The factory method creating the underlying action.- Parameters:
editor
- the editor the action to be created will work onrulerInfo
- the vertical ruler the action to be created will work on- Returns:
- the created action
-
setActiveEditor
Description copied from interface:IEditorActionDelegate
Sets the active editor for the delegate. Implementors should disconnect from the old editor, connect to the new editor, and update the action to reflect the new editor.- Specified by:
setActiveEditor
in interfaceIEditorActionDelegate
- Parameters:
callerAction
- the action proxy that handles presentation portion of the actiontargetEditor
- the new editor target
-
run
Description copied from class:ActionDelegate
TheActionDelegate
implementation of thisIActionDelegate
method does nothing. Subclasses may reimplement.Note: This method is not called directly by the proxy action. Only by the default implementation of
runWithEvent
of this abstract class.- Specified by:
run
in interfaceIActionDelegate
- Overrides:
run
in classActionDelegate
- Parameters:
callerAction
- the action proxy that handles the presentation portion of the action
-
runWithEvent
Description copied from class:ActionDelegate
TheActionDelegate
implementation of thisIActionDelegate2
method redirects to therun
method. Subclasses may reimplement.- Specified by:
runWithEvent
in interfaceIActionDelegate2
- Overrides:
runWithEvent
in classActionDelegate
- Parameters:
action
- the action proxy that handles the presentation portion of the actionevent
- the SWT event which triggered this action being run
-
selectionChanged
Description copied from class:ActionDelegate
TheActionDelegate
implementation of thisIActionDelegate
method does nothing. Subclasses may reimplement.- Specified by:
selectionChanged
in interfaceIActionDelegate
- Overrides:
selectionChanged
in classActionDelegate
- Parameters:
action
- the action proxy that handles presentation portion of the actionselection
- the current selection, ornull
if there is no selection.
-
mouseDoubleClick
Description copied from interface:MouseListener
Sent when a mouse button is pressed twice within the (operating system specified) double click period.- Specified by:
mouseDoubleClick
in interfaceMouseListener
- Parameters:
e
- an event containing information about the mouse double click- See Also:
-
mouseDown
Description copied from interface:MouseListener
Sent when a mouse button is pressed.- Specified by:
mouseDown
in interfaceMouseListener
- Parameters:
e
- an event containing information about the mouse button press
-
mouseUp
Description copied from interface:MouseListener
Sent when a mouse button is released.- Specified by:
mouseUp
in interfaceMouseListener
- Parameters:
e
- an event containing information about the mouse button release
-