public class MoveAction extends SelectionDispatchAction
The action is applicable to a homogeneous selection containing either projects, package fragment roots, package fragments, compilation units, or static methods.
This class may be instantiated; it is not intended to be subclassed.
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 and Description |
---|
MoveAction(IWorkbenchSite site)
Creates a new
MoveAction . |
MoveAction(org.eclipse.jdt.internal.ui.javaeditor.JavaEditor editor)
Note: This constructor is for internal use only.
|
Modifier and Type | Method and Description |
---|---|
void |
run(IStructuredSelection selection)
Executes this actions with the given structured selection.
|
void |
run(ITextSelection selection)
Executes this actions with the given text selection.
|
void |
selectionChanged(SelectionChangedEvent event) |
void |
setSpecialSelectionProvider(ISelectionProvider provider)
Sets a special selection provider which will be used instead of the site's selection provider.
|
void |
update(ISelection selection)
Updates the action's enablement state according to the given selection.
|
getSelection, getSelectionProvider, getShell, getSite, run, run, run, selectionChanged, selectionChanged, selectionChanged, selectionChanged
convertAccelerator, convertAccelerator, findKeyCode, findKeyString, findModifier, findModifierString, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isEnabled, isHandled, notifyResult, removeAcceleratorText, removeMnemonics, runWithEvent, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText
addPropertyChangeListener, firePropertyChange, firePropertyChange, removePropertyChangeListener
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
public MoveAction(IWorkbenchSite site)
MoveAction
. The action requires
that the selection provided by the site's selection provider is of type
org.eclipse.jface.viewers.IStructuredSelection
.site
- the site providing context information for this actionpublic MoveAction(org.eclipse.jdt.internal.ui.javaeditor.JavaEditor editor)
editor
- the java editorpublic void selectionChanged(SelectionChangedEvent event)
selectionChanged
in interface ISelectionChangedListener
selectionChanged
in class SelectionDispatchAction
public void setSpecialSelectionProvider(ISelectionProvider provider)
SelectionDispatchAction
setSpecialSelectionProvider
in class SelectionDispatchAction
provider
- a special selection provider which is used
instead of the site's selection provider or null
to use the site's
selection provider. Clients can for example use a ConvertingSelectionProvider
to first convert a selection before passing it to the action.public void run(IStructuredSelection selection)
SelectionDispatchAction
run(ISelection selection)
.run
in class SelectionDispatchAction
selection
- the selectionpublic void run(ITextSelection selection)
SelectionDispatchAction
run(ISelection selection)
.run
in class SelectionDispatchAction
selection
- the selectionpublic void update(ISelection selection)
SelectionDispatchAction
selectionChanged
methods depending on the type of the passed selection.update
in class SelectionDispatchAction
selection
- the selection this action is working on
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.