de.cau.cs.kieler.core.model.util
Class XtendTransformationUtil

java.lang.Object
  extended by de.cau.cs.kieler.core.model.util.XtendTransformationUtil

public final class XtendTransformationUtil
extends Object

Utitlity class to conveniently execute Xtend transformations.

Rating proposed yellow
(2010-06-04) proposed by haf

Method Summary
static XtendStatus model2ModelTransform(KielerProgressMonitor monitor, String xtendFile, String startFunction, URI inputModelURI, URI outputModelURI, EPackage... involvedMetamodels)
          This transformation uses the Xtend transformation language.
static IStatus model2ModelTransform(String xtendFile, String startFunction, URI inputModelURI, URI outputModelURI, EPackage... involvedMetamodels)
          This transformation uses the Xtend transformation language.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

model2ModelTransform

public static XtendStatus model2ModelTransform(KielerProgressMonitor monitor,
                                               String xtendFile,
                                               String startFunction,
                                               URI inputModelURI,
                                               URI outputModelURI,
                                               EPackage... involvedMetamodels)
This transformation uses the Xtend transformation language.

Parameters:
monitor - if true a progress bar is displayed
xtendFile - filename that holds the xtend functions
startFunction - initial transformation function
inputModelURI - EMF URI for input model (may be a local resource URI)
outputModelURI - EMF URI for output model
involvedMetamodels - EPackages of metamodels that need to be known to the transformation
Returns:
the Status about success and errors and warnings TODO: maybe someone needs to register more than exactly 2 metamodels, so make the parameters a list instead of 2 fixed parameters

model2ModelTransform

public static IStatus model2ModelTransform(String xtendFile,
                                           String startFunction,
                                           URI inputModelURI,
                                           URI outputModelURI,
                                           EPackage... involvedMetamodels)
                                    throws KielerException
This transformation uses the Xtend transformation language. Same as model2ModelTransform but executes the transformation in a MonitoredOperation an automatically pops up a progress bar.

Parameters:
xtendFile - filename that holds the xtend functions
startFunction - initial transformation function
inputModelURI - EMF URI for input model (may be a local resource URI)
outputModelURI - EMF URI for output model
involvedMetamodels - EPackages of metamodels that need to be known to the transformation
Returns:
the Status about success and errors and warnings
Throws:
KielerException - if something fails