public class TextViewerMoveLinesAction extends TextViewerAction
MoveLinesAction
Constructor and Description |
---|
TextViewerMoveLinesAction(java.util.ResourceBundle bundle,
java.lang.String prefix,
org.eclipse.jface.text.ITextViewer viewer,
boolean upwards,
boolean copy)
Creates and initializes the action for the given text viewer.
|
Modifier and Type | Method and Description |
---|---|
void |
runWithEvent(org.eclipse.swt.widgets.Event event) |
void |
update()
Always enables this action if it is connected to a text editor.
|
canModifyViewer, getSelection, getTextViewer, setViewer
getString, initialize, setHelpContextId
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, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText
addPropertyChangeListener, firePropertyChange, firePropertyChange, removePropertyChangeListener
public TextViewerMoveLinesAction(java.util.ResourceBundle bundle, java.lang.String prefix, org.eclipse.jface.text.ITextViewer viewer, boolean upwards, boolean copy)
bundle
- the resource bundleprefix
- a prefix to be prepended to the various resource keys (described in
ResourceAction
constructor), or null
if noneviewer
- the text viewerupwards
- true
if the selected lines should be moved upwards,
false
if downwardscopy
- if true
, the action will copy lines instead of moving themTextViewerAction.TextViewerAction(ResourceBundle, String, ITextViewer)
public void runWithEvent(org.eclipse.swt.widgets.Event event)
runWithEvent
in interface org.eclipse.jface.action.IAction
runWithEvent
in class org.eclipse.jface.action.Action
public void update()
TextViewerAction
null
,
the action is disabled. Subclasses may override.update
in interface org.eclipse.ui.texteditor.IUpdate
update
in class TextViewerAction