|
Re: From generated model to text [message #102151 is a reply to message #102122] |
Fri, 20 March 2009 13:35 |
|
This is a multi-part message in MIME format.
--------------080105080805050408050503
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit
Hi Marion,
I don't know JET enough to help you with it, but for such needs you can
look at all projects of the m2T project. Acceleo (
http://www.eclipse.org/modeling/m2t/?project=acceleo ) allows you to use
OCL to query your model and access links as you would in ATL. Do not
hesitate to ask about any of thesse projects on the eclipse.modeling.m2t
newsgroup.
Laurent Goubet
Obeo
Marion a
|
|
|
|
|
Re: From generated model to text [message #102232 is a reply to message #102216] |
Mon, 23 March 2009 17:26 |
Krzysztof Kowalczyk Messages: 113 Registered: July 2009 |
Senior Member |
|
|
Marion pisze:
> Thank you, Krzysztof, Xpand looks very promising. Still, for me it seems
> not possible to use any model generated with ATL for Xpand. Are there
> contraints on how to write the metamodels? Do I have to write the ATL
> transformation-rules in a certain way to be able to generate code from
> the resulting model with Xpand?
As long as output model is an Ecore model, there is no problem. You just
have to forward your model somehow.
Xpand use special workflow, that is now developed under Eclipse. I would
try to implement a component for that workflow that runs the ATL
transformation and put outcome in slot, that will be used by Xpand in
next step.
For today:
http://www.openarchitectureware.org/pub/documentation/4.3.1/ html/contents/workflow_reference.html
For future (Eclipse 3.5):
http://www.eclipse.org/modeling/emft/?project=mwe
They are in different packages but it is almost same thing.
Maybe ATL itself will provide a component for MWE? In older version of
openArchitectureWare, there was a workflow component to invoke ATL
transformation, it is not included in last oAW, but I think you need to
implement just one interface/class to achieve it (I guess
WorkflowComponentWithModelSlot or AbstractWorkflowComponent would be
good). It should be really easy, it just need some ATL API that will
execute transformation and return Ecore model.
The dirty way that would work for sure is to write your model to
standard XMI file and later read it in the workflow. I discourage such
solution though.
ps. Xpand can also work with XML Schema as a metamodel and XML as a
model or Java classes as a metamodel and Java objects as model, so it is
quite handy, it allow for M2M on them too (with Xtend which is OCL-like
query language for Xpand).
Regards,
Krzysztof Kowalczyk
|
|
|
Powered by
FUDForum. Page generated in 0.04338 seconds