EGF Engine
Release 0.1.0

org.eclipse.egf.model.edit.command.plugin
Class PluginChangeWrapperCommand

java.lang.Object
  extended by AbstractOverrideableCommand
      extended by org.eclipse.egf.model.edit.command.plugin.PluginChangeWrapperCommand
Direct Known Subclasses:
AbstractContextElementWrapperCommand, AbstractContractWrapperCommand, AbstractDomainWrapperCommand, AbstractFactoryComponentInvocationWrapperCommand, AbstractMappingWrapperCommand, AddContextInProductionPlanWrapperCommand, AddPatternLibraryWrapperCommand, AddPatternWrapperCommand, AddTaskFactoryHolderWrapperCommand, RemoveContextInProductionPlanWrapperCommand, RemovePatternLibraryWrapperCommand, RemovePatternWrapperCommand, RemoveTaskFactoryHolderWrapperCommand, SetFactoryComponentWrapperCommand, SetPatternLibraryWrapperCommand, SetPatternWrapperCommand, SetTaskFactoryHolderWrapperCommand

public abstract class PluginChangeWrapperCommand
extends AbstractOverrideableCommand


Constructor Summary
protected PluginChangeWrapperCommand(EditingDomain domain_p, EObject modelElement_p, EStructuralFeature feature_p, Object value_p)
          Constructor.
 
Method Summary
 boolean doCanUndo()
           
 void doExecute()
           
 void doRedo()
           
 void doUndo()
           
protected  IPluginChangesCommandRunner getCommandRunner()
          Get the plug-in changes command runner.
protected abstract  List<IPluginChangesCommand> getExecutablePluginChangeCommand()
          Returns the extension changes command used in the execute call.
protected  EStructuralFeature getFeature()
          Get the feature of the model element object upon the command will act.
protected  EgfPdeActivator getMDSoFaPde()
          Return the MDSoFA PDE activator.
protected  NamedModelElementWithId getModelElement()
          Get the model element object upon which this command will act.
protected  String getPluginId()
          Get Id of the plug-in that hosts the factory component where the model element object is contained by.
protected  List<IPluginChangesCommand> getRedoablePluginChangeCommand()
          Returns the extension changes command used in the redo call.
protected abstract  List<IPluginChangesCommand> getUndoablePluginChangeCommand()
          Returns the extension changes command used in the undo call.
protected  Object getValue()
          Get the modified value.
protected  boolean prepare()
           
 void setPluginId(String pluginId_p)
          Set given plug-in id.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PluginChangeWrapperCommand

protected PluginChangeWrapperCommand(EditingDomain domain_p,
                                     EObject modelElement_p,
                                     EStructuralFeature feature_p,
                                     Object value_p)
Constructor.

Parameters:
domain_p -
Method Detail

doExecute

public final void doExecute()
See Also:
org.eclipse.emf.edit.command.AbstractOverrideableCommand#doExecute()

getExecutablePluginChangeCommand

protected abstract List<IPluginChangesCommand> getExecutablePluginChangeCommand()
Returns the extension changes command used in the execute call.

Returns:

doCanUndo

public boolean doCanUndo()
See Also:
org.eclipse.emf.edit.command.AbstractOverrideableCommand#doCanUndo()

doRedo

public final void doRedo()
See Also:
org.eclipse.emf.edit.command.AbstractOverrideableCommand#doRedo()

getRedoablePluginChangeCommand

protected List<IPluginChangesCommand> getRedoablePluginChangeCommand()
Returns the extension changes command used in the redo call.
Default implementation calls getExecutablePluginChangeCommand()

Returns:

doUndo

public final void doUndo()
See Also:
org.eclipse.emf.edit.command.AbstractOverrideableCommand#doUndo()

getUndoablePluginChangeCommand

protected abstract List<IPluginChangesCommand> getUndoablePluginChangeCommand()
Returns the extension changes command used in the undo call.

Returns:

getCommandRunner

protected IPluginChangesCommandRunner getCommandRunner()
Get the plug-in changes command runner.

Returns:

getModelElement

protected NamedModelElementWithId getModelElement()
Get the model element object upon which this command will act.

Returns:

getFeature

protected EStructuralFeature getFeature()
Get the feature of the model element object upon the command will act.

Returns:

getValue

protected Object getValue()
Get the modified value.

Returns:

setPluginId

public void setPluginId(String pluginId_p)
Set given plug-in id.

Parameters:
pluginId_p -

getPluginId

protected String getPluginId()
Get Id of the plug-in that hosts the factory component where the model element object is contained by.

Returns:
can be null if not set by setPluginId(String)

getMDSoFaPde

protected EgfPdeActivator getMDSoFaPde()
Return the MDSoFA PDE activator.

Returns:

prepare

protected boolean prepare()
See Also:
org.eclipse.emf.common.command.AbstractCommand#prepare()

EGF Engine
Release 0.1.0

Copyright (c) Thales Corporate Services S.A.S, 2009.

This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.