de.cau.cs.kieler.core.model.xtend.transformation.xtend
Class XtendTransformationFramework

java.lang.Object
  extended by de.cau.cs.kieler.core.model.xtend.transformation.xtend.XtendTransformationFramework
All Implemented Interfaces:
ITransformationFramework

Deprecated. This class is used by KSBasE. For new implementations extend the XtendTransformationContext instead.

public class XtendTransformationFramework
extends Object
implements ITransformationFramework

An implementation of the ITransformationFramework interface for the use with the Xtend framework. FIXME this class depends on a GMF utility class; after it has been removed, the dependency to core.model.gmf should be deleted

Rating red

Constructor Summary
XtendTransformationFramework()
          Deprecated. Creates a new Xtend component.
 
Method Summary
 List<Object> createParameterMapping(List<EObject> parametersToMap, String... parameter)
          Deprecated. Creates a mapping between the selected diagram elements and the given list of formal parameters.
 Object executeTransformation()
          Deprecated. Executes a transformation.
 String getFileExtension()
          Deprecated. The default file extension for Xtend is 'ext'.
 boolean initializeTransformation(String fileName, String operation, String... basePackages)
          Deprecated. Initializes a transformation using the XtendFacade.
 List<AbstractTransformation> parseTransformations(URL fileName, boolean inplaceOnly)
          Deprecated. Parses a transformation file and returns the existing transformations.
 void reset()
          Deprecated. Resets the framework.
 boolean setParameters(List<EObject> parametersToMap, String... parameter)
          Deprecated. Sets the transformation parameters by matching the current selection with the given list of types.
 void setParameters(Object[] parameter)
          Deprecated. Sets the actual parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XtendTransformationFramework

public XtendTransformationFramework()
Deprecated. 
Creates a new Xtend component.

Method Detail

setParameters

public void setParameters(Object[] parameter)
Deprecated. 
Sets the actual parameters.

Specified by:
setParameters in interface ITransformationFramework
Parameters:
parameter - The parameters.

createParameterMapping

public List<Object> createParameterMapping(List<EObject> parametersToMap,
                                           String... parameter)
Deprecated. 
Creates a mapping between the selected diagram elements and the given list of formal parameters.

Specified by:
createParameterMapping in interface ITransformationFramework
Parameters:
parametersToMap - The list of parameters that should be mapped. If this is null, the parameters are retrieved from the current selection
parameter - The list of formal parameters
Returns:
The parameters or null if the mapping could not achieved

setParameters

public boolean setParameters(List<EObject> parametersToMap,
                             String... parameter)
Deprecated. 
Sets the transformation parameters by matching the current selection with the given list of types.

Specified by:
setParameters in interface ITransformationFramework
Parameters:
parametersToMap - The list of parameters that should be mapped. If this is null, the parameters are retrieved from the current selection
parameter - The list of parameter types.
Returns:
True if all parameters could be matched

reset

public void reset()
Deprecated. 
Resets the framework. This needs to be called if a transformation is initialized but not executed.

Specified by:
reset in interface ITransformationFramework

initializeTransformation

public boolean initializeTransformation(String fileName,
                                        String operation,
                                        String... basePackages)
Deprecated. 
Initializes a transformation using the XtendFacade.

Specified by:
initializeTransformation in interface ITransformationFramework
Parameters:
fileName - The extension file name
operation - The extension to execute
basePackages - The class name of the editors EPackage
Returns:
False if an error occurred.

executeTransformation

public Object executeTransformation()
                             throws TransformException
Deprecated. 
Executes a transformation.

Specified by:
executeTransformation in interface ITransformationFramework
Returns:
The return value from XtendFacade.call()
Throws:
TransformException - in case the transformation fails

parseTransformations

public List<AbstractTransformation> parseTransformations(URL fileName,
                                                         boolean inplaceOnly)
Deprecated. 
Parses a transformation file and returns the existing transformations.

Specified by:
parseTransformations in interface ITransformationFramework
Parameters:
fileName - a URL to the transformation file
inplaceOnly - indicates if only in-place transformations should be parsed. If this flag is set to 'false' in-place transformations will be ignored!
Returns:
a list of abstract transformations.

getFileExtension

public String getFileExtension()
Deprecated. 
The default file extension for Xtend is 'ext'.

Specified by:
getFileExtension in interface ITransformationFramework
Returns:
'ext'