Package org.eclipse.ui.texteditor

# Class SelectAnnotationRulerAction

java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.jface.action.AbstractAction
org.eclipse.jface.action.Action
org.eclipse.ui.texteditor.ResourceAction
org.eclipse.ui.texteditor.TextEditorAction
org.eclipse.ui.texteditor.SelectAnnotationRulerAction

All Implemented Interfaces:
  `IAction`, `IVerticalRulerListener`, `IUpdate`

public class SelectAnnotationRulerAction extends TextEditorAction implements IVerticalRulerListener
A ruler action which can select the textual range of an annotation that has a visual representation in a vertical ruler.

Since:
  3.0

## Field Summary

### Fields inherited from interface org.eclipse.jface.action.IAction

`AS_CHECK_BOX, AS_DROP_DOWN_MENU, AS_PUSH_BUTTON, AS_RADIO_BUTTON, AS_UNSPECIFIED, CHECKED, DESCRIPTION, ENABLED, HANDLED, IMAGE, RESULT, TEXT, TOOL_TIP_TEXT`

## Constructor Summary

Constructors
Constructor
Description
`SelectAnnotationRulerAction(ResourceBundle bundle, String prefix, ITextEditor editor)`
Creates a new action for the given ruler and editor.

## Method Summary

Modifier and Type
Method
Description
`void`
`annotationContextMenuAboutToShow(VerticalRulerEvent event, Menu menu)`
Called when the context menu is opened on an annotation in the vertical ruler.
`void`
`annotationDefaultSelected(VerticalRulerEvent event)`
Called when a default selection occurs on an annotation in the vertical ruler.
`void`
`annotationSelected(VerticalRulerEvent event)`
Called when an annotation is selected in the vertical ruler.
`protected IAnnotationModel`
`getAnnotationModel()`
Returns the `AbstractMarkerAnnotationModel` of the editor's input.
`void`
`setEditor(ITextEditor editor)`
Retargets this action to the given editor.

### Methods inherited from class org.eclipse.ui.texteditor.TextEditorAction

`canModifyEditor, getTextEditor, update, validateEditorInputState`

### Methods inherited from class org.eclipse.ui.texteditor.ResourceAction

`getString, initialize, setHelpContextId`

### Methods inherited from class org.eclipse.jface.action.Action

`convertAccelerator, convertAccelerator, findKeyCode, findKeyString, findModifier, findModifierString, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isEnabled, isHandled, notifyResult, removeAcceleratorText, removeMnemonics, run, runWithEvent, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText`

### Methods inherited from class org.eclipse.jface.action.AbstractAction

`addPropertyChangeListener, firePropertyChange, firePropertyChange, removePropertyChangeListener`

### Methods inherited from class org.eclipse.core.commands.common.EventManager

`addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### SelectAnnotationRulerAction

public SelectAnnotationRulerAction(ResourceBundle bundle, String prefix, ITextEditor editor)
Creates a new action for the given ruler and editor. The action configures its visual representation from the given resource bundle.

Parameters:
  `bundle` - the resource bundle
  `prefix` - a prefix to be prepended to the various resource keys (described in `ResourceAction` constructor), or `null` if none
  `editor` - the editor
See Also:
  - `ResourceAction(ResourceBundle, String)`

## Method Details

### setEditor

public void setEditor(ITextEditor editor)
Description copied from class: `TextEditorAction`
Retargets this action to the given editor.

Overrides:
  `setEditor` in class `TextEditorAction`
Parameters:
  `editor` - the new editor, or `null` if none

### getAnnotationModel

protected IAnnotationModel getAnnotationModel()
Returns the `AbstractMarkerAnnotationModel` of the editor's input.

Returns:
  the marker annotation model or `null` if there's none

### annotationSelected

public void annotationSelected(VerticalRulerEvent event)
Description copied from interface: `IVerticalRulerListener`
Called when an annotation is selected in the vertical ruler.

Specified by:
  `annotationSelected` in interface `IVerticalRulerListener`
Parameters:
  `event` - the annotation event that occurred

### annotationDefaultSelected

public void annotationDefaultSelected(VerticalRulerEvent event)
Description copied from interface: `IVerticalRulerListener`
Called when a default selection occurs on an annotation in the vertical ruler.

Specified by:
  `annotationDefaultSelected` in interface `IVerticalRulerListener`
Parameters:
  `event` - the annotation event that occurred

### annotationContextMenuAboutToShow

public void annotationContextMenuAboutToShow(VerticalRulerEvent event, Menu menu)
Description copied from interface: `IVerticalRulerListener`
Called when the context menu is opened on an annotation in the vertical ruler.

Specified by:
  `annotationContextMenuAboutToShow` in interface `IVerticalRulerListener`
Parameters:
  `event` - the annotation event that occurred
  `menu` - the menu that is about to be shown