org.eclipse.emf.workspace
Interface IWorkspaceCommandStack

All Known Implementing Classes:
WorkspaceCommandStackImpl

public interface IWorkspaceCommandStack

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:
IWorkspaceCommandStack.getDefaultUndoContext()

Method Summary
 org.eclipse.core.commands.operations.IUndoContext getDefaultUndoContext()
          Obtains the default undo context to add to the undoable operations that I execute on my operation history to wrap Commands.
 org.eclipse.core.commands.operations.IOperationHistory getOperationHistory()
          Obtains the operation history to which I delegate command execution.
 

Method Detail

getOperationHistory

public org.eclipse.core.commands.operations.IOperationHistory getOperationHistory()
Obtains the operation history to which I delegate command execution.

Returns:
my operation history

getDefaultUndoContext

public org.eclipse.core.commands.operations.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, 2006 IBM Corporation and others.
All Rights Reserved.