|
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
org.eclipse.gmf.runtime.common.ui.action.actions.global.GlobalUndoAction
public final class GlobalUndoAction
Global Undo Action.
Extension of the GMF GlobalAction class that delegates undo behaviour
to the undoable operation framework's UndoActionHandler.
The undo context can be set through setUndoContext(IUndoContext).
If it is not explicitly set, the undo context will be derived by adapting the
workbench part to IUndoContext.
| 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 | |
|---|---|
GlobalUndoAction(IWorkbenchPage workbenchPage)
Initializes me with a workbench page. |
|
GlobalUndoAction(IWorkbenchPart workbenchPart)
Initilizes me with a workbench part. |
|
| Method Summary | |
|---|---|
void |
dispose()
Sets my delegate to null. |
protected void |
doRun(IProgressMonitor progressMonitor)
Delegates to the operation framework action handler. |
java.lang.String |
getActionId()
Returns the GlobalActionId handled by this action |
java.lang.String |
getDescription()
Delegates to the operation framework action handler. |
ImageDescriptor |
getDisabledImageDescriptor()
Delegates to the operation framework action handler. |
ImageDescriptor |
getHoverImageDescriptor()
Delegates to the operation framework action handler. |
ImageDescriptor |
getImageDescriptor()
Delegates to the operation framework action handler. |
java.lang.String |
getText()
Delegates to the operation framework action handler. |
java.lang.String |
getToolTipText()
Delegates to the operation framework action handler. |
IUndoContext |
getUndoContext()
Gets my undo context. |
org.eclipse.gmf.runtime.common.ui.action.IActionWithProgress.WorkIndicatorType |
getWorkIndicatorType()
No work indicator type since my delegate takes care of showing progress. |
protected void |
initializeWithContext(IUndoContext context)
Initializes me with a new undo context. |
boolean |
isEnabled()
Delegates to the operation framework action handler. |
boolean |
isHandled()
Delegates to the operation framework action handler. |
protected boolean |
isOperationHistoryListener()
Listens to the operation history events. |
void |
refresh()
Delegates to the operation framework action handler. |
void |
setChecked(boolean checked)
Delegates to the operation framework action handler. |
void |
setUndoContext(IUndoContext context)
Sets my undo context. |
protected void |
setWorkbenchPart(IWorkbenchPart workbenchPart)
Extends the superclass implementation to update the operation history undo action handler to which I delegate. |
| Methods inherited from class org.eclipse.gmf.runtime.common.ui.action.global.GlobalAction |
|---|
createCompositeCommand, createContext, getGlobalActionHandlerData, getObjectContextGlobalActionHandlerData, getWorkbenchActionConstant, init |
| Methods inherited from class org.eclipse.gmf.runtime.common.ui.action.AbstractActionHandler |
|---|
contributedToPart, getActionManager, getLabel, getOperationHistory, getPartListener, getSelection, getStructuredSelection, getWorkbenchPage, getWorkbenchPart, handle, historyNotification, isDisposed, isPropertyListener, isRunnable, isSelectionListener, isSetup, needsSetup, openErrorDialog, propertyChanged, run, run, runWithEvent, selectionChanged, setDisposed, setPartSelector, setSetup, setup |
| Methods inherited from class org.eclipse.jface.action.Action |
|---|
convertAccelerator, convertAccelerator, findKeyCode, findKeyString, findModifier, findModifierString, getAccelerator, getActionDefinitionId, getHelpListener, getId, getMenuCreator, getStyle, isChecked, notifyResult, removeAcceleratorText, removeMnemonics, setAccelerator, setActionDefinitionId, 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 |
| 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, getHelpListener, getId, getMenuCreator, getStyle, isChecked, removePropertyChangeListener, setAccelerator, setActionDefinitionId, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText |
| Constructor Detail |
|---|
public GlobalUndoAction(IWorkbenchPage workbenchPage)
workbenchPage - the pagepublic GlobalUndoAction(IWorkbenchPart workbenchPart)
workbenchPart - the part| Method Detail |
|---|
public java.lang.String getActionId()
GlobalActionGlobalActionId handled by this action
getActionId in class GlobalActionprotected void setWorkbenchPart(IWorkbenchPart workbenchPart)
setWorkbenchPart in class org.eclipse.gmf.runtime.common.ui.action.AbstractActionHandlerprotected void initializeWithContext(IUndoContext context)
context.
context - the undo contextpublic ImageDescriptor getImageDescriptor()
getImageDescriptor in interface IActiongetImageDescriptor in class Actionpublic ImageDescriptor getDisabledImageDescriptor()
getDisabledImageDescriptor in interface IActiongetDisabledImageDescriptor in class Actionpublic ImageDescriptor getHoverImageDescriptor()
getHoverImageDescriptor in interface IActiongetHoverImageDescriptor in class Actionpublic java.lang.String getText()
getText in interface IActiongetText in class Actionpublic java.lang.String getToolTipText()
getToolTipText in interface IActiongetToolTipText in class Actionpublic java.lang.String getDescription()
getDescription in interface IActiongetDescription in class Actionpublic boolean isEnabled()
isEnabled in interface IActionisEnabled in class Actionpublic boolean isHandled()
isHandled in interface IActionisHandled in class Actionpublic void setChecked(boolean checked)
setChecked in interface IActionsetChecked in class Actionprotected void doRun(IProgressMonitor progressMonitor)
doRun in class GlobalActionpublic void refresh()
refresh in interface org.eclipse.gmf.runtime.common.ui.action.IActionWithProgressrefresh in class GlobalActionpublic final void setUndoContext(IUndoContext context)
undoContext - my undo contextpublic final IUndoContext getUndoContext()
getUndoContext in class GlobalActionnull if no one has set my
undo context and my workbench part does not adapt to
IUndoContext.protected boolean isOperationHistoryListener()
isOperationHistoryListener in class org.eclipse.gmf.runtime.common.ui.action.AbstractActionHandlerpublic void dispose()
null.
dispose in interface org.eclipse.gmf.runtime.common.ui.action.IDisposableActiondispose in class org.eclipse.gmf.runtime.common.ui.action.AbstractActionHandlerpublic org.eclipse.gmf.runtime.common.ui.action.IActionWithProgress.WorkIndicatorType getWorkIndicatorType()
getWorkIndicatorType in interface org.eclipse.gmf.runtime.common.ui.action.IActionWithProgressgetWorkIndicatorType 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.