Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMT (Generative Modeling Technologies) » [MOFScript] Java Api howto
[MOFScript] Java Api howto [message #376303] Mon, 05 March 2007 15:33 Go to next message
Eclipse User
Originally posted by: angel.calvo.centic.es

Hello,

I'm using the MOFScript Java API like in the example of the User Manual,
and my question is: How I can set a transformation for the execution
manager without parse it?

Thanks,
Re: [MOFScript] Java Api howto [message #376304 is a reply to message #376303] Fri, 09 March 2007 08:02 Go to previous message
Jon Oldevik is currently offline Jon Oldevik
Messages: 17
Registered: July 2009
Junior Member
Hi Angel Luis,

You can only do this if you have a model representation (EMF) of your
transformation instead the textual representation.

If you have the model representation, you can do the following:

ExecutionManager execMgr = ExecutionManager.getExecutionManager();
MOfScriptSpecification mofsciptSpec = <load your transformation model from
somewhere>
execMgr.setTransformationModel (mofscriptSpec);
execMgr.executeTransformation ();


If you do not have your transformation represented as a model, you cannot
bypass parsing. You need to run the parser to obtain a valid representation
(model) of your transformation. After you have done this one time - and you
are not going to modify your transformation, you can store your
transformation model and exeecute that as illustrated above.

Best regards,
Jon Oldevik

"Angel Luis Calvo Ortega" <angel.calvo@centic.es> wrote in message
news:eshd6f$h2c$1@utils.eclipse.org...
> Hello,
>
> I'm using the MOFScript Java API like in the example of the User Manual,
> and my question is: How I can set a transformation for the execution
> manager without parse it?
>
> Thanks,
Re: [MOFScript] Java Api howto [message #578006 is a reply to message #376303] Fri, 09 March 2007 08:02 Go to previous message
Jon Oldevik is currently offline Jon Oldevik
Messages: 17
Registered: July 2009
Junior Member
Hi Angel Luis,

You can only do this if you have a model representation (EMF) of your
transformation instead the textual representation.

If you have the model representation, you can do the following:

ExecutionManager execMgr = ExecutionManager.getExecutionManager();
MOfScriptSpecification mofsciptSpec = <load your transformation model from
somewhere>
execMgr.setTransformationModel (mofscriptSpec);
execMgr.executeTransformation ();


If you do not have your transformation represented as a model, you cannot
bypass parsing. You need to run the parser to obtain a valid representation
(model) of your transformation. After you have done this one time - and you
are not going to modify your transformation, you can store your
transformation model and exeecute that as illustrated above.

Best regards,
Jon Oldevik

"Angel Luis Calvo Ortega" <angel.calvo@centic.es> wrote in message
news:eshd6f$h2c$1@utils.eclipse.org...
> Hello,
>
> I'm using the MOFScript Java API like in the example of the User Manual,
> and my question is: How I can set a transformation for the execution
> manager without parse it?
>
> Thanks,
Previous Topic:[MOFScript] Java Api howto
Next Topic:xText: any text rule
Goto Forum:
  


Current Time: Fri Oct 24 12:02:22 GMT 2014

Powered by FUDForum. Page generated in 0.04741 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software