|
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.core.commands.SetPropertyCommand
public class SetPropertyCommand
A command to a set a property of a view
| Constructor Summary | |
|---|---|
SetPropertyCommand(TransactionalEditingDomain editingDomain,
IAdaptable viewAdapter,
java.lang.String propertyId,
java.lang.String propertyName,
java.lang.Object newValue)
Creates a set property command with a default label based on property name |
|
SetPropertyCommand(TransactionalEditingDomain editingDomain,
java.lang.String label,
IAdaptable viewAdapter,
java.lang.String propertyId,
java.lang.Object newValue)
Creates a set property command with a given label |
|
| Method Summary | |
|---|---|
protected CommandResult |
doExecuteWithResult(IProgressMonitor progressMonitor,
IAdaptable info)
Implemented by subclasses to perform the model changes. |
java.util.List |
getAffectedFiles()
Returns the IFiles for resources that may be modified when the
operation is executed, undone or redone. |
java.lang.String |
getLabel()
|
protected java.lang.Object |
getNewValue()
Returns the new value of the property. |
protected java.lang.Object |
getPropertyId()
Returns the property Id. |
protected java.lang.String |
getPropertyName()
Gets the property name |
protected EStructuralFeature |
getPropertyStructuralFeature()
Returns the value of the feature of the property |
protected IAdaptable |
getViewAdapter()
Returns the view Adapter that owns the property. |
protected void |
setNewValue(java.lang.Object newValue)
Sets the newValue that will be set for the property. |
protected void |
setPropertyId(java.lang.String propertyId)
Sets the propertyId of the property. |
protected void |
setPropertyName(java.lang.String string)
Sets the property name |
protected void |
setViewAdapter(IAdaptable viewAdapter)
Sets the viewAdapter that owns the property. |
| Methods inherited from class org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand |
|---|
aggregateStatuses, cleanup, 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, 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.gmf.runtime.common.core.command.ICommand |
|---|
setLabel |
| Methods inherited from interface org.eclipse.core.commands.operations.IUndoableOperation |
|---|
addContext, canExecute, canRedo, canUndo, dispose, execute, getContexts, hasContext, redo, removeContext, undo |
| Constructor Detail |
|---|
public SetPropertyCommand(TransactionalEditingDomain editingDomain,
java.lang.String label,
IAdaptable viewAdapter,
java.lang.String propertyId,
java.lang.Object newValue)
editingDomain - the editing domainlabel - the command labelviewAdapter - the view adapter of the View that owns the propertypropertyId - the property Id of the property to setnewValue - the new value of the property
public SetPropertyCommand(TransactionalEditingDomain editingDomain,
IAdaptable viewAdapter,
java.lang.String propertyId,
java.lang.String propertyName,
java.lang.Object newValue)
editingDomain - the editing domainviewAdapter - the view adapter of the View that owns the propertypropertyId - the property Id of the property to setpropertyName - the property namenewValue - the new value of the property| 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 AbstractTransactionalCommandIFiles that will be modifiedpublic java.lang.String getLabel()
getLabel in interface IUndoableOperationgetLabel in class AbstractOperation
protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor,
IAdaptable info)
throws ExecutionException
AbstractTransactionalCommand
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 java.lang.Object getNewValue()
protected java.lang.Object getPropertyId()
protected IAdaptable getViewAdapter()
protected java.lang.String getPropertyName()
protected void setNewValue(java.lang.Object newValue)
newValue - The newValue to setprotected void setPropertyId(java.lang.String propertyId)
propertyId - The propertyId to setprotected void setViewAdapter(IAdaptable viewAdapter)
viewAdapter - The viewAdapter to setprotected void setPropertyName(java.lang.String string)
string - the property nameprotected EStructuralFeature getPropertyStructuralFeature()
view - the view to use to get the valuefeature - the feature to use
null
|
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.