|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.ui.texteditor.AbstractRulerActionDelegate
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)
.
Constructor Summary | |
AbstractRulerActionDelegate()
|
Method Summary | |
protected 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 |
mouseDoubleClick(MouseEvent e)
Sent when a mouse button is pressed twice within the (operating system specified) double click period. |
void |
mouseDown(MouseEvent e)
Sent when a mouse button is pressed. |
void |
mouseUp(MouseEvent e)
Sent when a mouse button is released. |
void |
run(IAction callerAction)
Performs this action. |
void |
selectionChanged(IAction action,
ISelection selection)
Notifies this action delegate that the selection in the workbench has changed. |
void |
setActiveEditor(IAction callerAction,
IEditorPart targetEditor)
Sets the active editor for the delegate. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AbstractRulerActionDelegate()
Method Detail |
protected abstract IAction createAction(ITextEditor editor, IVerticalRulerInfo rulerInfo)
editor
- the editor the action to be created will work onrulerInfo
- the vertical ruler the action to be created will work on
public void setActiveEditor(IAction callerAction, IEditorPart targetEditor)
IEditorActionDelegate
setActiveEditor
in interface IEditorActionDelegate
callerAction
- the action proxy that handles presentation portion of the actiontargetEditor
- the new editor targetpublic void run(IAction callerAction)
IActionDelegate
This method is called when the delegating action has been triggered. Implement this method to do the actual work.
run
in interface IActionDelegate
callerAction
- the action proxy that handles the presentation portion of the
actionpublic void selectionChanged(IAction action, ISelection selection)
IActionDelegate
Implementers can use this opportunity to change the availability of the action or to modify other presentation properties.
selectionChanged
in interface IActionDelegate
action
- the action proxy that handles presentation portion of
the actionselection
- the current selection, or null
if there
is no selection.public void menuAboutToShow(IMenuManager manager)
IMenuListener
menuAboutToShow
in interface IMenuListener
manager
- the menu managerpublic void mouseDoubleClick(MouseEvent e)
MouseListener
mouseDoubleClick
in interface MouseListener
e
- an event containing information about the mouse double clickDisplay.getDoubleClickTime()
public void mouseDown(MouseEvent e)
MouseListener
mouseDown
in interface MouseListener
e
- an event containing information about the mouse button presspublic void mouseUp(MouseEvent e)
MouseListener
mouseUp
in interface MouseListener
e
- an event containing information about the mouse button release
|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |