org.eclipse.emf.workspace
Interface IWorkspaceCommandStack

All Superinterfaces:
CommandStack, TransactionalCommandStack
All Known Implementing Classes:
WorkspaceCommandStackImpl

public interface IWorkspaceCommandStack
extends TransactionalCommandStack

A specialized transactional command stack that delegates the execution of commands to an IOperationHistory. This command stack supports execution of Commands, but supports the following APIs only in terms of the default undo context of the command stack:

All of the above operations map to the effective linear stack of operations in the history that wrap commands and have the default undo context. Thus, they will only be consistent with the default command stack semantics if all commands executed on this command stack's operation history use its default undo context (which is guaranteed if all commands are executed via this stack).

See Also:
getDefaultUndoContext()

Method Summary
 IUndoContext getDefaultUndoContext()
          Obtains the default undo context to add to the undoable operations that I execute on my operation history to wrap Commands.
 IOperationHistory getOperationHistory()
          Obtains the operation history to which I delegate command execution.
 
Methods inherited from interface org.eclipse.emf.transaction.TransactionalCommandStack
execute, getExceptionHandler, setExceptionHandler
 
Methods inherited from interface org.eclipse.emf.common.command.CommandStack
addCommandStackListener, canRedo, canUndo, execute, flush, getMostRecentCommand, getRedoCommand, getUndoCommand, redo, removeCommandStackListener, undo
 

Method Detail

getOperationHistory

IOperationHistory getOperationHistory()
Obtains the operation history to which I delegate command execution.

Returns:
my operation history

getDefaultUndoContext

IUndoContext getDefaultUndoContext()
Obtains the default undo context to add to the undoable operations that I execute on my operation history to wrap Commands. Moreover, undo, redo, and flush are context-specific operations in the operation history, so my undo/redo/flush commands use this context in delegating to the history. Likewise, the determination of the most recent command and undo/redo commands depends on this context.

Returns:
the default undo context for undo/redo/flush invocations
See Also:
TransactionalCommandStack.execute(Command, java.util.Map), CommandStack.undo(), CommandStack.redo(), CommandStack.flush(), CommandStack.getMostRecentCommand(), CommandStack.getUndoCommand(), CommandStack.getRedoCommand()

Copyright 2002, 2007 IBM Corporation and others.
All Rights Reserved.