| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.emf.common.command.AbstractCommand
org.eclipse.emf.common.command.CommandWrapper
org.eclipse.emf.edit.provider.ItemProviderAdapter.ResultAndAffectedObjectsWrappingCommand
A ResultAndAffectedObjectsWrappingCommand wraps another command to substitute IWrapperItemProviders for their values in the command's result and affected objects. This is needed as the values have been unwrapped for the command to operate on properly.
A list of wrappers from which to substitute is formed by calling getChildren on the command's owner(s). Additional wrappers to be considered for the result can by specified in the two-argument constructor. The first wrapper whose value matches a given value in the result or affected objects is substitued for it.
Nested Class Summary |
Nested classes inherited from class org.eclipse.emf.common.command.AbstractCommand |
AbstractCommand.NonDirtying |
Field Summary | |
protected Collection | additionalWrappers
|
protected List | owners
|
Fields inherited from class org.eclipse.emf.common.command.CommandWrapper |
command |
Fields inherited from class org.eclipse.emf.common.command.AbstractCommand |
description, isExecutable, isPrepared, label |
Constructor Summary | |
ItemProviderAdapter.ResultAndAffectedObjectsWrappingCommand(Command command)
| |
ItemProviderAdapter.ResultAndAffectedObjectsWrappingCommand(Command command,
Collection additionalResultWrappers)
|
Method Summary | |
protected void | addOwners(Command command)
Helper method that builds the list of owners, recursively for command wrappers and/or compound commands. |
Collection | getAffectedObjects()
Delegates to the getAffectedObjects method of the command. |
List | getOwners()
Returns any owners from the wrapped command. |
Collection | getResult()
Delegates to the getResult method of the command. |
protected Collection | wrapValues(Collection unwrappedValues,
boolean useAdditionalWrappers)
|
Methods inherited from class org.eclipse.emf.common.command.CommandWrapper |
canUndo, createCommand, dispose, execute, getCommand, getDescription, getLabel, prepare, redo, toString, undo |
Methods inherited from class org.eclipse.emf.common.command.AbstractCommand |
canExecute, chain, setDescription, setLabel |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected List owners
protected Collection additionalWrappers
Constructor Detail |
public ItemProviderAdapter.ResultAndAffectedObjectsWrappingCommand(Command command)
public ItemProviderAdapter.ResultAndAffectedObjectsWrappingCommand(Command command, Collection additionalResultWrappers)
Method Detail |
public Collection getResult()
public Collection getAffectedObjects()
protected Collection wrapValues(Collection unwrappedValues, boolean useAdditionalWrappers)
public List getOwners()
protected void addOwners(Command command)
|
Copyright 2001-2004 IBM Corporation and others. All Rights Reserved. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |