public class RenameAction extends SelectionDispatchAction
Action is applicable to selections containing elements of type
IJavaElement
or IResource
.
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 |
---|
RenameAction(IWorkbenchSite site)
Creates a new
RenameAction . |
RenameAction(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 |
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
public RenameAction(IWorkbenchSite site)
RenameAction
. 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 RenameAction(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 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 onpublic 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 selection
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.