EGF Engine
Release 0.1.0

org.eclipse.egf.model.edit.command.plugin.mapping
Class AbstractMappingWrapperCommand

java.lang.Object
  extended by AbstractOverrideableCommand
      extended by org.eclipse.egf.model.edit.command.plugin.PluginChangeWrapperCommand
          extended by org.eclipse.egf.model.edit.command.plugin.mapping.AbstractMappingWrapperCommand
Direct Known Subclasses:
AddMappingWrapperCommand, RemoveMappingWrapperCommand, SetMappingWrapperCommand

public abstract class AbstractMappingWrapperCommand
extends PluginChangeWrapperCommand

Base class to implement commands that wrap mapping modifications in a mapping extension.


Constructor Summary
AbstractMappingWrapperCommand(EditingDomain domain_p, EObject modelElement_p, EStructuralFeature feature_p, Object value_p)
          Constructor.
 
Method Summary
protected  void createMappingFile(String mappingFileFullPath_p)
          Create the mapping file for current mapping model element.
protected  List<IPluginChangesCommand> getExecutablePluginChangeCommand()
          Returns the extension changes command used in the execute call.
protected abstract  MappingModel getMapping()
          Get the mapping model element.
protected  String getMappingPath(String mappingFilePath_p, IProject project_p)
          Return the full path relative to the workspace for specified mapping parameters.
protected  List<IPluginChangesCommand> getUndoablePluginChangeCommand()
          Returns the extension changes command used in the undo call.
protected abstract  void handleMappingFile(String mappingFileFullPath_p)
          Handle the mapping file for given parameters.
protected  void initializeInputOrOutput(Ecore2EcoreMappingRoot mappingRoot_p, String resourcePath_p, EReference containerReference_p, ResourceSet resourceSet_p)
          Initialize the input or output for specified mapping root.
 
Methods inherited from class org.eclipse.egf.model.edit.command.plugin.PluginChangeWrapperCommand
doCanUndo, doExecute, doRedo, doUndo, getCommandRunner, getFeature, getMDSoFaPde, getModelElement, getPluginId, getRedoablePluginChangeCommand, getValue, prepare, setPluginId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractMappingWrapperCommand

public AbstractMappingWrapperCommand(EditingDomain domain_p,
                                     EObject modelElement_p,
                                     EStructuralFeature feature_p,
                                     Object value_p)
Constructor.

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

getExecutablePluginChangeCommand

protected List<IPluginChangesCommand> getExecutablePluginChangeCommand()
Description copied from class: PluginChangeWrapperCommand
Returns the extension changes command used in the execute call.

Specified by:
getExecutablePluginChangeCommand in class PluginChangeWrapperCommand
Returns:
See Also:
PluginChangeWrapperCommand.getExecutablePluginChangeCommand()

handleMappingFile

protected abstract void handleMappingFile(String mappingFileFullPath_p)
Handle the mapping file for given parameters.

Parameters:
mappingFileFullPath_p - relative path to the workspace.

getMappingPath

protected String getMappingPath(String mappingFilePath_p,
                                IProject project_p)
Return the full path relative to the workspace for specified mapping parameters.

Parameters:
mappingFilePath_p -
project_p -
Returns:

initializeInputOrOutput

protected void initializeInputOrOutput(Ecore2EcoreMappingRoot mappingRoot_p,
                                       String resourcePath_p,
                                       EReference containerReference_p,
                                       ResourceSet resourceSet_p)
Initialize the input or output for specified mapping root.

Parameters:
mappingRoot_p -
resourcePath_p -
containerReference_p -
resourceSet_p -

createMappingFile

protected void createMappingFile(String mappingFileFullPath_p)
Create the mapping file for current mapping model element.

Parameters:
mappingFileFullPath_p -

getMapping

protected abstract MappingModel getMapping()
Get the mapping model element.

Returns:

getUndoablePluginChangeCommand

protected List<IPluginChangesCommand> getUndoablePluginChangeCommand()
Description copied from class: PluginChangeWrapperCommand
Returns the extension changes command used in the undo call.

Specified by:
getUndoablePluginChangeCommand in class PluginChangeWrapperCommand
Returns:
See Also:
PluginChangeWrapperCommand.getUndoablePluginChangeCommand()

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.