|
Runtime | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.core.commands.operations.AbstractOperation
org.eclipse.emf.workspace.AbstractEMFOperation
org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand
org.eclipse.gmf.runtime.diagram.ui.commands.DeferredLayoutCommand
This command is used to arrange editparts on a diagram, when only the view adapters are available at the time of creating the command. It is necessary to have the editparts when creating a layout command so this command defers the creation of the layout command until execution time at which point it can get the editparts from the editpart registry using the view adapters.
| Field Summary | |
protected IGraphicalEditPart |
containerEP
the diagram editpart used to get the editpart registry |
protected java.lang.String |
layoutType
the type of layout to be performed |
protected java.util.List |
viewAdapters
the IAdaptables from which an View can be retrieved |
| Constructor Summary | |
DeferredLayoutCommand(org.eclipse.emf.transaction.TransactionalEditingDomain editingDomain,
java.util.List viewAdapters,
IGraphicalEditPart containerEP)
Constructor for DeferredLayoutCommand. |
|
DeferredLayoutCommand(org.eclipse.emf.transaction.TransactionalEditingDomain editingDomain,
java.util.List viewAdapters,
IGraphicalEditPart containerEP,
java.lang.String commandLayoutType)
Constructor for DeferredLayoutCommand. |
|
| Method Summary | |
protected void |
cleanup()
Subclasses may implement this method to dispose of objects that were required for execution, but are no longer require to undo or redo this operation. |
protected CommandResult |
doExecuteWithResult(IProgressMonitor progressMonitor,
IAdaptable info)
Executes a layout command with all the editparts for the view adapters. |
java.util.List |
getAffectedFiles()
Returns the IFiles for resources that may be modified when the
operation is executed, undone or redone. |
protected IGraphicalEditPart |
getContainerEP()
gets the container edit part |
protected IFigure |
getContainerFigure()
gets the container edit part's figure |
protected java.util.List |
getViewAdapters()
gets a list of IAdaptable that can adapt to
View |
| Methods inherited from class org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand |
aggregateStatuses, compose, didRedo, didUndo, doExecute, doRedo, doUndo, getCommandResult, getWorkspaceFiles, getWorkspaceFiles, internalSetResult, reduce, setResult |
| Methods inherited from class org.eclipse.emf.workspace.AbstractEMFOperation |
canRedo, canUndo, didCommit, dispose, execute, getChange, getEditingDomain, getOptions, redo, undo |
| Methods inherited from class org.eclipse.core.commands.operations.AbstractOperation |
addContext, canExecute, getContexts, getLabel, hasContext, removeContext, setLabel, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.eclipse.core.commands.operations.IUndoableOperation |
addContext, canExecute, canRedo, canUndo, dispose, execute, getContexts, getLabel, hasContext, redo, removeContext, undo |
| Field Detail |
protected java.lang.String layoutType
protected java.util.List viewAdapters
protected IGraphicalEditPart containerEP
| Constructor Detail |
public DeferredLayoutCommand(org.eclipse.emf.transaction.TransactionalEditingDomain editingDomain,
java.util.List viewAdapters,
IGraphicalEditPart containerEP)
DeferredLayoutCommand.
editingDomain - the editing domain through which model changes are madeviewAdapters - the IAdaptables from which an IView can be retrievedcontainerEP - the container editpart used to get the editpart registry
public DeferredLayoutCommand(org.eclipse.emf.transaction.TransactionalEditingDomain editingDomain,
java.util.List viewAdapters,
IGraphicalEditPart containerEP,
java.lang.String commandLayoutType)
DeferredLayoutCommand.
editingDomain - the editing domain through which model changes are madeviewAdapters - the IAdaptables from which an IView can be retrievedcontainerEP - the container editpart used to get the editpart registrycommandLayoutType - the type of layout to be performed| Method Detail |
public java.util.List getAffectedFiles()
AbstractTransactionalCommandIFiles for resources that may be modified when the
operation is executed, undone or redone.
getAffectedFiles in interface ICommandgetAffectedFiles in class AbstractTransactionalCommand
protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor,
IAdaptable info)
throws ExecutionException
doExecuteWithResult in class AbstractTransactionalCommandprogressMonitor - the progress monitor provided by the operation historyinfo - the adaptable provided by the operation history
ExecutionException - if, for some reason, I fail to complete
the operationprotected void cleanup()
AbstractTransactionalCommand
This method is invoked at the end of
AbstractTransactionalCommand.doExecute(IProgressMonitor, IAdaptable).
cleanup in class AbstractTransactionalCommandprotected IFigure getContainerFigure()
protected IGraphicalEditPart getContainerEP()
protected java.util.List getViewAdapters()
IAdaptable that can adapt to
View
|
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.