EGF Engine
Release 0.1.0

org.eclipse.egf.model.edit.command
Class AbstractModelElementCommand

java.lang.Object
  extended by CompoundCommand
      extended by org.eclipse.egf.model.edit.command.AbstractModelElementCommand
Direct Known Subclasses:
AddModelElementCommand, ChangeRecorderWrapperCommand, RemoveModelElementCommand, SetModelElementCommand

public abstract class AbstractModelElementCommand
extends CompoundCommand

Base class to implement commands that modify a NamedModelElementWithId object with forwarding model element changes to related plug-in file.


Constructor Summary
protected AbstractModelElementCommand(EditingDomain editingDomain_p, EObject modelElement_p, EStructuralFeature feature_p, Object value_p)
          Constructor.
 
Method Summary
protected  void doExecute()
          Forward modifications on plug-in file.
 void execute()
           
protected abstract  Command getCrudCommand(EditingDomain editingDomain_p, EObject modelElement_p, EStructuralFeature feature_p, Object value_p)
          Get the initial EMF CRUD command to execute : SetCommand, AddCommand, ...
protected  String getDetailedLabel()
          Get the detailed label for this command.
 String getLabel()
           
 void setPluginChangeCommand(PluginChangeWrapperCommand command_p)
          Set the plug-in change command upon which the model element changes will be forwarded.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractModelElementCommand

protected AbstractModelElementCommand(EditingDomain editingDomain_p,
                                      EObject modelElement_p,
                                      EStructuralFeature feature_p,
                                      Object value_p)
Constructor.

Parameters:
editingDomain_p -
modelElement_p -
feature_p -
value_p -
Method Detail

getCrudCommand

protected abstract Command getCrudCommand(EditingDomain editingDomain_p,
                                          EObject modelElement_p,
                                          EStructuralFeature feature_p,
                                          Object value_p)
Get the initial EMF CRUD command to execute : SetCommand, AddCommand, ...

Parameters:
editingDomain_p -
modelElement_p -
feature_p -
value_p -
Returns:

setPluginChangeCommand

public void setPluginChangeCommand(PluginChangeWrapperCommand command_p)
Set the plug-in change command upon which the model element changes will be forwarded.

Parameters:
command_p -

execute

public void execute()
See Also:
org.eclipse.emf.common.command.CompoundCommand#execute()

doExecute

protected void doExecute()
Forward modifications on plug-in file.


getLabel

public String getLabel()
See Also:
org.eclipse.emf.common.command.CompoundCommand#getLabel()

getDetailedLabel

protected String getDetailedLabel()
Get the detailed label for this command.


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.