public class ImportsAwareClipboardAction
extends org.eclipse.ui.texteditor.TextEditorAction
Modifier and Type | Class and Description |
---|---|
static class |
ImportsAwareClipboardAction.Factory |
static class |
ImportsAwareClipboardAction.XbaseClipboardData |
Constructor and Description |
---|
ImportsAwareClipboardAction(java.util.ResourceBundle bundle,
java.lang.String prefix,
org.eclipse.ui.texteditor.ITextEditor editor,
int operationCode)
Creates the action.
|
Modifier and Type | Method and Description |
---|---|
protected void |
internalDoOperation() |
void |
run() |
void |
setEditor(org.eclipse.ui.texteditor.ITextEditor editor) |
protected boolean |
shouldAddImports(org.eclipse.jface.text.IDocument document,
int caretOffset)
Should not add imports when pasting into a
XStringLiteral or Comments (except of JavaDoc) |
void |
update() |
canModifyEditor, getTextEditor, validateEditorInputState
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, runWithEvent, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText
addPropertyChangeListener, firePropertyChange, firePropertyChange, removePropertyChangeListener
public ImportsAwareClipboardAction(java.util.ResourceBundle bundle, java.lang.String prefix, org.eclipse.ui.texteditor.ITextEditor editor, int operationCode)
bundle
- the resource bundleprefix
- a prefix to be prepended to the various resource keys (described in ResourceAction
constructor), or null
if noneeditor
- the text editor. May not be null
.operationCode
- the operation codeprotected void internalDoOperation()
protected boolean shouldAddImports(org.eclipse.jface.text.IDocument document, int caretOffset)
XStringLiteral
or Comments (except of JavaDoc)document
- - IDocument
to work withcaretOffset
- - current caret offsetpublic void update()
update
in interface org.eclipse.ui.texteditor.IUpdate
update
in class org.eclipse.ui.texteditor.TextEditorAction
public void run()
run
in interface org.eclipse.jface.action.IAction
run
in class org.eclipse.jface.action.Action
public void setEditor(org.eclipse.ui.texteditor.ITextEditor editor)
setEditor
in class org.eclipse.ui.texteditor.TextEditorAction