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(org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor editor)
Note: This constructor is for internal use only.
|
MoveAction(IWorkbenchSite site)
Creates a new
MoveAction . |
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 |
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, setSpecialSelectionProvider
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addPropertyChangeListener, removePropertyChangeListener
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.CompilationUnitEditor editor)
editor
- the compilation unit editorpublic void selectionChanged(SelectionChangedEvent event)
selectionChanged
in interface ISelectionChangedListener
selectionChanged
in class SelectionDispatchAction
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 onCopyright (c) IBM Corp. and others 2000, 2006. All Rights Reserved.