public class OpenAction
extends org.eclipse.ui.actions.BaseSelectionListenerAction
| Constructor and Description |
|---|
OpenAction(EditorOpener editorOpener)
Constructs an open action with the given editor opener.
|
OpenAction(org.eclipse.ui.IWorkbenchPage page,
EditorUtility editorUtility)
Constructs an open action with the given workbench page and the given
editor utility; uses a default editor opener.
|
| Modifier and Type | Method and Description |
|---|---|
protected IStatusAcceptor |
newStatusAcceptor()
Returns a new instance of the status acceptor for this action.
|
void |
run()
For each of the currently selected elements that has a
corresponding editor input,
this implementation uses the editor opener to open and reveal the
element in an appropriate editor; if an error occurs while opening
the editor, it is reported to the status acceptor. |
protected boolean |
updateSelection(org.eclipse.jface.viewers.IStructuredSelection selection)
This implementation returns
false if the given selection
is null or empty, or if no editor input corresponds to a selected element;
otherwise, true is returned. |
clearCache, getStructuredSelection, runWithEvent, selectionChanged, selectionChangedconvertAccelerator, convertAccelerator, findKeyCode, findKeyString, findModifier, findModifierString, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isEnabled, isHandled, notifyResult, removeAcceleratorText, removeMnemonics, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipTextaddPropertyChangeListener, firePropertyChange, firePropertyChange, removePropertyChangeListenerpublic OpenAction(org.eclipse.ui.IWorkbenchPage page,
EditorUtility editorUtility)
page - the workbench page to open the editor in
(not null)editorUtility - the editor utility for this action
(not null)OpenAction(EditorOpener)public OpenAction(EditorOpener editorOpener)
editorOpener - the editor opener for this action
(not null)public void run()
corresponding editor input,
this implementation uses the editor opener to open and reveal the
element in an appropriate editor; if an error occurs while opening
the editor, it is reported to the status acceptor.run in interface org.eclipse.jface.action.IActionrun in class org.eclipse.jface.action.ActionEditorOpener.open(Object, boolean, boolean),
newStatusAcceptor()protected boolean updateSelection(org.eclipse.jface.viewers.IStructuredSelection selection)
false if the given selection
is null or empty, or if no editor input corresponds to a selected element;
otherwise, true is returned.updateSelection in class org.eclipse.ui.actions.BaseSelectionListenerActionprotected IStatusAcceptor newStatusAcceptor()
A default status acceptor logs each status to the error log and displays an error dialog when done and at least one status was accepted.
null)Copyright (c) 2014, 2020 1C-Soft LLC and others. Made available under the Eclipse Public License 2.0