Package org.eclipse.ui.actions
Class OpenPerspectiveAction
java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.jface.action.AbstractAction
org.eclipse.jface.action.Action
org.eclipse.ui.actions.OpenPerspectiveAction
- All Implemented Interfaces:
IAction
,IPluginContribution
Opens a perspective.
- Since:
- 3.1
-
Field Summary
Fields inherited from interface org.eclipse.jface.action.IAction
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 Summary
ConstructorDescriptionOpenPerspectiveAction
(IWorkbenchWindow window, IPerspectiveDescriptor descriptor, PerspectiveMenu callback) Constructs a new instance ofOpenPerspectiveAction
-
Method Summary
Modifier and TypeMethodDescriptionvoid
runWithEvent
(Event event) The default implementation of thisIAction
method ignores the event argument, and simply callsrun()
.Methods inherited from class org.eclipse.jface.action.Action
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
Methods inherited from class org.eclipse.jface.action.AbstractAction
addPropertyChangeListener, firePropertyChange, firePropertyChange, removePropertyChangeListener
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
-
Constructor Details
-
OpenPerspectiveAction
public OpenPerspectiveAction(IWorkbenchWindow window, IPerspectiveDescriptor descriptor, PerspectiveMenu callback) Constructs a new instance ofOpenPerspectiveAction
- Parameters:
window
- The workbench window in which this action is created; should not benull
.descriptor
- The descriptor for the perspective that this action should open; must not benull
.callback
- The perspective menu who will handle the actual execution of this action; should not benull
.
-
-
Method Details
-
runWithEvent
Description copied from class:Action
The default implementation of thisIAction
method ignores the event argument, and simply callsrun()
. Subclasses should override this method if they need information from the triggering event, or overriderun()
if not.- Specified by:
runWithEvent
in interfaceIAction
- Overrides:
runWithEvent
in classAction
- Parameters:
event
- the SWT event which triggered this action being run- See Also:
-
getLocalId
- Specified by:
getLocalId
in interfaceIPluginContribution
- Returns:
- the local id of the contribution. Must not be
null
. This should correspond to the extension-specific identifier for a given contribution.
-
getPluginId
- Specified by:
getPluginId
in interfaceIPluginContribution
- Returns:
- the id of the originating plugin. Can be
null
if this contribution did not originate from a plugin.
-