Runtime

org.eclipse.gmf.runtime.common.ui.action.actions.global
Class GlobalRedoAction

java.lang.Object
  extended by org.eclipse.core.commands.common.EventManager
      extended by org.eclipse.jface.action.AbstractAction
          extended by org.eclipse.jface.action.Action
              extended by org.eclipse.gmf.runtime.common.ui.action.AbstractActionHandler
                  extended by org.eclipse.gmf.runtime.common.ui.action.global.GlobalAction
                      extended by org.eclipse.gmf.runtime.common.ui.action.actions.global.GlobalRedoAction
All Implemented Interfaces:
IOperationHistoryListener, org.eclipse.gmf.runtime.common.ui.action.IActionWithProgress, org.eclipse.gmf.runtime.common.ui.action.IDisposableAction, IAction, ISelectionChangedListener, IPropertyListener

public final class GlobalRedoAction
extends GlobalAction

Global Redo Action.

Extension of the GMF GlobalAction class that delegates redo behaviour to the undoable operation framework's RedoActionHandler.

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
GlobalRedoAction(IWorkbenchPage workbenchPage)
          Initializes me with a workbench page.
GlobalRedoAction(IWorkbenchPart workbenchPart)
          Initializes 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

GlobalRedoAction

public GlobalRedoAction(IWorkbenchPage workbenchPage)
Initializes me with a workbench page.

Parameters:
workbenchPage - the page

GlobalRedoAction

public GlobalRedoAction(IWorkbenchPart workbenchPart)
Initializes me with a workbench part.

Parameters:
workbenchPart - the part
Method Detail

getActionId

public java.lang.String getActionId()
Description copied from class: GlobalAction
Returns the GlobalActionId handled by this action

Specified by:
getActionId in class GlobalAction
Returns:
int

setWorkbenchPart

protected void setWorkbenchPart(IWorkbenchPart workbenchPart)
Extends the superclass implementation to update the operation history undo action handler to which I delegate.

Overrides:
setWorkbenchPart in class org.eclipse.gmf.runtime.common.ui.action.AbstractActionHandler

initializeWithContext

protected void initializeWithContext(IUndoContext context)
Initializes me with a new undo context.

Parameters:
context - the undo context

getImageDescriptor

public ImageDescriptor getImageDescriptor()
Delegates to the operation framework action handler.

Specified by:
getImageDescriptor in interface IAction
Overrides:
getImageDescriptor in class Action

getDisabledImageDescriptor

public ImageDescriptor getDisabledImageDescriptor()
Delegates to the operation framework action handler.

Specified by:
getDisabledImageDescriptor in interface IAction
Overrides:
getDisabledImageDescriptor in class Action

getHoverImageDescriptor

public ImageDescriptor getHoverImageDescriptor()
Delegates to the operation framework action handler.

Specified by:
getHoverImageDescriptor in interface IAction
Overrides:
getHoverImageDescriptor in class Action

getText

public java.lang.String getText()
Delegates to the operation framework action handler.

Specified by:
getText in interface IAction
Overrides:
getText in class Action

getToolTipText

public java.lang.String getToolTipText()
Delegates to the operation framework action handler.

Specified by:
getToolTipText in interface IAction
Overrides:
getToolTipText in class Action

getDescription

public java.lang.String getDescription()
Delegates to the operation framework action handler.

Specified by:
getDescription in interface IAction
Overrides:
getDescription in class Action

isEnabled

public boolean isEnabled()
Delegates to the operation framework action handler.

Specified by:
isEnabled in interface IAction
Overrides:
isEnabled in class Action

isHandled

public boolean isHandled()
Delegates to the operation framework action handler.

Specified by:
isHandled in interface IAction
Overrides:
isHandled in class Action

setChecked

public void setChecked(boolean checked)
Delegates to the operation framework action handler.

Specified by:
setChecked in interface IAction
Overrides:
setChecked in class Action

doRun

protected void doRun(IProgressMonitor progressMonitor)
Delegates to the operation framework action handler.

Overrides:
doRun in class GlobalAction

refresh

public void refresh()
Delegates to the operation framework action handler.

Specified by:
refresh in interface org.eclipse.gmf.runtime.common.ui.action.IActionWithProgress
Overrides:
refresh in class GlobalAction

setUndoContext

public final void setUndoContext(IUndoContext context)
Sets my undo context. It will no longer be derived from the workbench part.

Parameters:
undoContext - my undo context

getUndoContext

public final IUndoContext getUndoContext()
Gets my undo context. If it has not been explicitly set, derives the undo context from my workbench part.

Overrides:
getUndoContext in class GlobalAction
Returns:
my undo context. May be null if no one has set my undo context and my workbench part does not adapt to IUndoContext.

isOperationHistoryListener

protected boolean isOperationHistoryListener()
Listens to the operation history events.

Overrides:
isOperationHistoryListener in class org.eclipse.gmf.runtime.common.ui.action.AbstractActionHandler

dispose

public void dispose()
Sets my delegate to null.

Specified by:
dispose in interface org.eclipse.gmf.runtime.common.ui.action.IDisposableAction
Overrides:
dispose in class org.eclipse.gmf.runtime.common.ui.action.AbstractActionHandler

getWorkIndicatorType

public org.eclipse.gmf.runtime.common.ui.action.IActionWithProgress.WorkIndicatorType getWorkIndicatorType()
No work indicator type since my delegate takes care of showing progress.

Specified by:
getWorkIndicatorType in interface org.eclipse.gmf.runtime.common.ui.action.IActionWithProgress
Overrides:
getWorkIndicatorType in class org.eclipse.gmf.runtime.common.ui.action.AbstractActionHandler

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.