|
Runtime | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ICompositeCommand
A self-composing undoable operation that is has a CommandResult
, a
list of affected IFile
s, and is composed of child operations.
Does not extend ICompositeOperation
because
remove(IUndoableOperation)
does not dispose the removed
operation
Method Summary | |
---|---|
void |
add(IUndoableOperation operation)
Add the specified operation as a child of this operation. |
boolean |
isEmpty()
Answers whether or not this composite operation has children. |
java.util.Iterator |
iterator()
Obtains an iterator to traverse my child operations. |
java.util.ListIterator |
listIterator()
Obtains an iterator to traverse my child operations in either direction. |
java.util.ListIterator |
listIterator(int index)
Obtains an iterator to traverse my child operations in either direction, starting from the specified index . |
void |
remove(IUndoableOperation operation)
Remove the specified operation from this operation. |
int |
size()
Queries the number of child operations that I contain. |
Methods inherited from interface org.eclipse.gmf.runtime.common.core.command.ICommand |
---|
compose, getAffectedFiles, getCommandResult, reduce, setLabel |
Methods inherited from interface org.eclipse.core.commands.operations.IUndoableOperation |
---|
addContext, canExecute, canRedo, canUndo, dispose, execute, getContexts, getLabel, hasContext, redo, removeContext, undo |
Method Detail |
---|
void add(IUndoableOperation operation)
Add the specified operation as a child of this operation.
operation
- the operation to be added. If the operation instance has
already been added, this method will have no effect.void remove(IUndoableOperation operation)
Remove the specified operation from this operation.
Unlike ICompositeOperation
, this does not dispose of the removed
operation since the composite did not create the operation.
operation
- the operation to be removed. The operation should be disposed
by the receiver. This method will have no effect if the
operation instance is not already a child.boolean isEmpty()
true
if the operation does not have children,
false
otherwise.int size()
java.util.Iterator iterator()
java.util.ListIterator listIterator()
Note that, unlike list iterators generally, this one does not
permit the addition of an operation that I already contain (the composite
does not permit duplicates). Moreover, only IUndoableOperation
s
may be added, otherwise ClassCastException
s will result.
java.util.ListIterator listIterator(int index)
index
. Adding and removing
children via this iterator correctly maintains my undo contexts.
Note that, unlike list iterators generally, this one does not
permit the addition of an operation that I already contain (the composite
does not permit duplicates). Moreover, only IUndoableOperation
s
may be added, otherwise ClassCastException
s will result.
index
- the index in my children at which to start iterating
|
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.