public final class OpenPerspectiveAction extends Action implements IPluginContribution
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 |
---|
OpenPerspectiveAction(IWorkbenchWindow window,
IPerspectiveDescriptor descriptor,
PerspectiveMenu callback)
Constructs a new instance of
OpenPerspectiveAction |
Modifier and Type | Method and Description |
---|---|
String |
getLocalId() |
String |
getPluginId() |
void |
runWithEvent(Event event)
The default implementation of this
IAction method ignores
the event argument, and simply calls run() . |
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
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
public OpenPerspectiveAction(IWorkbenchWindow window, IPerspectiveDescriptor descriptor, PerspectiveMenu callback)
OpenPerspectiveAction
window
- The workbench window in which this action is created; should
not be null
.descriptor
- The descriptor for the perspective that this action should
open; must not be null
.callback
- The perspective menu who will handle the actual execution of
this action; should not be null
.public void runWithEvent(Event event)
Action
IAction
method ignores
the event argument, and simply calls run()
. Subclasses
should override this method if they need information from the triggering
event, or override run()
if not.runWithEvent
in interface IAction
runWithEvent
in class Action
event
- the SWT event which triggered this action being runHow radio buttons are handled
,
How check boxes are handled
public String getLocalId()
getLocalId
in interface IPluginContribution
null
.
This should correspond to the extension-specific identifier for
a given contribution.public String getPluginId()
getPluginId
in interface IPluginContribution
null
if
this contribution did not originate from a plugin.
Copyright (c) 2000, 2018 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.