Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [QVTo] How to create a model (extent) from an element.
[QVTo] How to create a model (extent) from an element. [message #529855] Tue, 27 April 2010 13:21
Eclipse UserFriend
Originally posted by:


I have a QVTo transformation X, and I want to instantiate another
subtransformation Y at runtime.

The subtransformation looks like this:
transformation Y(inout inOutModel : mm_cif);

I want to create an instance of Y from transformation X as follows:

var subtrans : Y := new Y(m);

the problem is how to construct m. I do have an object of the mm_cif
metamodel (which automatically is a Stdlib::Element), but in order to
create the subtransformation, I need a model extent (which is a

I know I can create an empty model extent using:

var m : mm_cif := mm_cif.createEmptyModel().oclAsType(mm_cif);

However, I don't know how to create a model extent with anything in it,
or how to fill an empty model extent with (root) objects.

Does anyone know how to create a model (extent) from an element, or how
to add elements to a model extent created at runtime?

Previous Topic:[ATL]referenced object
Next Topic:ATL - Using elements of a referenced metamodel
Goto Forum:

Current Time: Fri Aug 14 06:37:07 GMT 2020

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

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

Back to the top