|
Runtime | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.core.commands.common.EventManager
org.eclipse.jface.action.AbstractAction
org.eclipse.jface.action.Action
org.eclipse.gmf.runtime.common.ui.action.AbstractActionHandler
org.eclipse.gmf.runtime.common.ui.action.global.GlobalAction
public abstract class GlobalAction
The abstract parent of all concrete global actions. A concrete global action
needs to override the getActionId()
method. The concrete
global action could override the createContext()
and
createCompoundCommand()
methods.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.eclipse.gmf.runtime.common.ui.action.IActionWithProgress |
---|
org.eclipse.gmf.runtime.common.ui.action.IActionWithProgress.WorkIndicatorType |
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 | |
---|---|
GlobalAction(IWorkbenchPage workbenchPage)
Creates a GlobalAction. |
|
GlobalAction(IWorkbenchPart workbenchPart)
Creates a GlobalAction. |
Method Summary | |
---|---|
protected CompositeCommand |
createCompositeCommand(java.util.List commands)
Returns a CompositeCommand whose undo context is derived from my workbench part. |
protected IGlobalActionContext |
createContext()
Returns a IGlobalActionContext |
protected void |
doRun(IProgressMonitor progressMonitor)
|
abstract java.lang.String |
getActionId()
Returns the GlobalActionId handled by this action |
protected java.util.List |
getGlobalActionHandlerData()
Returns a list of GlobalActionHandlerData . |
protected java.util.List |
getObjectContextGlobalActionHandlerData()
Returns a list with a GlobalActionHandlerData object containing a context of Object. |
protected IUndoContext |
getUndoContext()
Gets the undo context from my workbench part. |
protected java.lang.String |
getWorkbenchActionConstant()
Returns the workbenchActionConstant. |
void |
init()
|
void |
refresh()
|
Methods inherited from class org.eclipse.gmf.runtime.common.ui.action.AbstractActionHandler |
---|
contributedToPart, dispose, getActionManager, getLabel, getOperationHistory, getPartListener, getSelection, getStructuredSelection, getWorkbenchPage, getWorkbenchPart, getWorkIndicatorType, handle, historyNotification, isDisposed, isOperationHistoryListener, isPropertyListener, isRunnable, isSelectionListener, isSetup, needsSetup, openErrorDialog, propertyChanged, run, run, runWithEvent, selectionChanged, setDisposed, setPartSelector, setSetup, setup, setWorkbenchPart |
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.jface.action.IAction |
---|
addPropertyChangeListener, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isEnabled, isHandled, removePropertyChangeListener, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText |
Constructor Detail |
---|
public GlobalAction(IWorkbenchPart workbenchPart)
workbenchPart
- The part associated with this actionpublic GlobalAction(IWorkbenchPage workbenchPage)
workbenchPage
- The part associated with this actionMethod Detail |
---|
protected void doRun(IProgressMonitor progressMonitor)
doRun
in class org.eclipse.gmf.runtime.common.ui.action.AbstractActionHandler
public void refresh()
public abstract java.lang.String getActionId()
GlobalActionId
handled by this action
protected CompositeCommand createCompositeCommand(java.util.List commands)
CompositeCommand
whose undo context is derived from my workbench part.
commands
- a list of commands to compose into a CompositeCommand
protected IUndoContext getUndoContext()
null
.
getUndoContext
in class org.eclipse.gmf.runtime.common.ui.action.AbstractActionHandler
protected IGlobalActionContext createContext()
IGlobalActionContext
protected java.util.List getGlobalActionHandlerData()
GlobalActionHandlerData
. Handles
different types of selections
protected java.lang.String getWorkbenchActionConstant()
protected java.util.List getObjectContextGlobalActionHandlerData()
public void init()
init
in interface org.eclipse.gmf.runtime.common.ui.action.IDisposableAction
init
in class org.eclipse.gmf.runtime.common.ui.action.AbstractActionHandler
|
Runtime | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.