|
Eclipse Platform Release 3.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jface.action.Action
org.eclipse.ui.actions.SelectionProviderAction
The abstract superclass for actions that listen to selection changes from a particular selection provider. This implementation splits the current selection along structured/unstructured lines, providing a convenient place to monitor selection changes that require adjusting action state.
Subclasses must implement the following IAction method:
Subclasses may reimplement either of the following methods:
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, IMAGE, RESULT, TEXT, TOOL_TIP_TEXT |
Constructor Summary | |
protected | SelectionProviderAction(ISelectionProvider provider,
String text)
Creates a new action with the given text that monitors selection changes within the given selection provider. |
Method Summary | |
void | dispose()
Disposes this action by removing it as a listener from the selection provider. |
ISelection | getSelection()
Returns the current selection in the selection provider. |
ISelectionProvider | getSelectionProvider()
Returns the selection provider that is the target of this action. |
IStructuredSelection | getStructuredSelection()
Returns the current structured selection in the selection provider, or an empty selection if nothing is selected or if selection does not include objects (for example, raw text). |
void | selectionChanged(ISelection selection)
Notifies this action that the given (non-structured) selection has changed in the selection provider. |
void | selectionChanged(IStructuredSelection selection)
Notifies this action that the given structured selection has changed in the selection provider. |
void | selectionChanged(SelectionChangedEvent event)
The SelectionProviderAction implementation of this ISelectionChangedListener method calls selectionChanged(IStructuredSelection) if the selection is a structured selection but selectionChanged(ISelection) if it is not. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected SelectionProviderAction(ISelectionProvider provider, String text)
Method Detail |
public void dispose()
public ISelection getSelection()
public ISelectionProvider getSelectionProvider()
public IStructuredSelection getStructuredSelection()
public void selectionChanged(ISelection selection)
The SelectionProviderAction implementation of this method does nothing. Subclasses may reimplement to react to this selection change.
public void selectionChanged(IStructuredSelection selection)
The SelectionProviderAction implementation of this method does nothing. Subclasses may reimplement to react to this selection change.
public final void selectionChanged(SelectionChangedEvent event)
|
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.