Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse Platform Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.ui.texteditor
Class AbstractRulerActionDelegate

    java.lang.Object
      org.eclipse.ui.texteditor.AbstractRulerActionDelegate

All Implemented Interfaces:
  EventListener, IActionDelegate, IEditorActionDelegate, IMenuListener, MouseListener, org.eclipse.swt.internal.SWTEventListener

Direct Known Subclasses:
  BookmarkRulerAction, SelectRulerAction, TaskRulerAction

public abstract class AbstractRulerActionDelegate
extends Object
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
`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

### AbstractRulerActionDelegate

    public AbstractRulerActionDelegate()

Method Detail

### createAction

    protected abstract IAction createAction(ITextEditor editor,
                                            IVerticalRulerInfo rulerInfo)

  The factory method creating the underlying action.

  Parameters:
    `editor` - the editor the action to be created will work on
    `rulerInfo` - the vertical ruler the action to be created will work on
  Returns:
    the created action

### setActiveEditor

    public void setActiveEditor(IAction callerAction,
                                IEditorPart targetEditor)

  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 interface `IEditorActionDelegate`
  Parameters:
    `callerAction` - the action proxy that handles presentation portion of the action
    `targetEditor` - the new editor target

### run

    public void run(IAction callerAction)

  Description copied from interface: `IActionDelegate`
  Performs this action.

  This method is called by the proxy action when the action has been triggered. Implement this method to do the actual work.

  Note: If the action delegate also implements `IActionDelegate2`, then this method is not invoked but instead the `runWithEvent(IAction, Event)` method is called.

  Specified by:
    `run` in interface `IActionDelegate`
  Parameters:
    `callerAction` - the action proxy that handles the presentation portion of the action

### selectionChanged

    public void selectionChanged(IAction action,
                                 ISelection selection)

  Description copied from interface: `IActionDelegate`
  Notifies this action delegate that the selection in the workbench has changed.

  Implementers can use this opportunity to change the availability of the action or to modify other presentation properties.

  When the selection changes, the action enablement state is updated based on the criteria specified in the plugin.xml file. Then the delegate is notified of the selection change regardless of whether the enablement criteria in the plugin.xml file is met.

  Specified by:
    `selectionChanged` in interface `IActionDelegate`
  Parameters:
    `action` - the action proxy that handles presentation portion of the action
    `selection` - the current selection, or `null` if there is no selection.

### menuAboutToShow

    public void menuAboutToShow(IMenuManager manager)

  Description copied from interface: `IMenuListener`
  Notifies this listener that the menu is about to be shown by the given menu manager.

  Specified by:
    `menuAboutToShow` in interface `IMenuListener`
  Parameters:
    `manager` - the menu manager

### mouseDoubleClick

    public void mouseDoubleClick(MouseEvent e)

  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 interface `MouseListener`
  Parameters:
    `e` - an event containing information about the mouse double click
  See Also:
    `Display.getDoubleClickTime()`

### mouseDown

    public void mouseDown(MouseEvent e)

  Description copied from interface: `MouseListener`
  Sent when a mouse button is pressed.

  Specified by:
    `mouseDown` in interface `MouseListener`
  Parameters:
    `e` - an event containing information about the mouse button press

### mouseUp

    public void mouseUp(MouseEvent e)

  Description copied from interface: `MouseListener`
  Sent when a mouse button is released.

  Specified by:
    `mouseUp` in interface `MouseListener`
  Parameters:
    `e` - an event containing information about the mouse button release

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse Platform Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.