I am a newbie to MTL and GMF, so pls excuse me if I am off the
topic here.

From my understanding, it will be possible to use MTL to build
code generators (like C++, Java etc) that generate source code
from EMF based data models (such as UML2 that most Eclipse based
UML editors are based upon).

As far as I can understand, the code generator will then be
able to look at the data in EMF and adapt the generated code
dependent on the data settings inside the EMF datastructures
(UML2 in this case).

But what happens with UML products that add diagram specific
propery settings, such as the line color or font setting that
exist for many GUI objects in GMF generated diagram editors?
As far as I can understand, such GUI property settings are
purely part of the diagram editor, not the underlying EMF
datamodel (UML2).

Will an MTL based code generator be able to look at also these
(GMF/diagram specific) property settings and adapt the code
generation dependent on these GUI settings too?

Or do I need to create a UML profile to store custom specific
settings that can modify the behaviour in the code generator?
Or how do I otherwise add my own GUI property settings, that
can affect the code generator that is built using MTL (without
rewriting UML2)?

I.e, what I want to do is to use the EMF-based UML2 datastructures
together with a GMF generated diagram editor, and create a
code generator that modify its behaviour dependent on GUI settings
which does not exist in the origial EMF model (I don't want to
touch UML2 in this case).

I didn't really understand if you're trying to
1) generate code from an UML model created by a GMF modeler for UML files
or
2) generate code from an UML meta-model for which you created a GMF modeler

In both cases, there is a way to access both the UML data and the GUI
information. For 1), you could create MTL generators on the GMF diagram
which allows you to navigate to the UML model while having your GUI
information at hand in the diagram.

For 2), you'd need to create your generators targetting the gmfgen so
that you can access all of : the UML meta-model, the gmfgraph, the
gmftool ... that might be a lot of work :).

If neither of those answer the question, feel free to correct my
interpretations.

my understanding:
you wants to create a (uml/ecore etc...) model from a gmf editor, and
that gmf editor would also store information affecting the main model.
This meta-model data you want to retrieve from the GMG gui.

then (from my limited jet based perspecitive), serializing that
meta-model to xml and loading it into your transformation as well
instead of getting it from the plugin.

laurent Goubet wrote:
> Hi Johan,
>
> I didn't really understand if you're trying to
> 1) generate code from an UML model created by a GMF modeler for UML files
> or
> 2) generate code from an UML meta-model for which you created a GMF modeler
>
> In both cases, there is a way to access both the UML data and the GUI
> information. For 1), you could create MTL generators on the GMF diagram
> which allows you to navigate to the UML model while having your GUI
> information at hand in the diagram.
>
> For 2), you'd need to create your generators targetting the gmfgen so
> that you can access all of : the UML meta-model, the gmfgraph, the
> gmftool ... that might be a lot of work :).
>
> If neither of those answer the question, feel free to correct my
> interpretations.
>
> Laurent
>
> Johan a écrit :
>> Hi,
>>
>> I am a newbie to MTL and GMF, so pls excuse me if I am off the topic
>> here.
>>
>> From my understanding, it will be possible to use MTL to build
>> code generators (like C++, Java etc) that generate source code
>> from EMF based data models (such as UML2 that most Eclipse based
>> UML editors are based upon).
>>
>> As far as I can understand, the code generator will then be
>> able to look at the data in EMF and adapt the generated code
>> dependent on the data settings inside the EMF datastructures
>> (UML2 in this case).
>>
>> But what happens with UML products that add diagram specific
>> propery settings, such as the line color or font setting that exist
>> for many GUI objects in GMF generated diagram editors?
>> As far as I can understand, such GUI property settings are
>> purely part of the diagram editor, not the underlying EMF
>> datamodel (UML2).
>>
>> Will an MTL based code generator be able to look at also these
>> (GMF/diagram specific) property settings and adapt the code generation
>> dependent on these GUI settings too?
>>
>> Or do I need to create a UML profile to store custom specific settings
>> that can modify the behaviour in the code generator?
>> Or how do I otherwise add my own GUI property settings, that
>> can affect the code generator that is built using MTL (without
>> rewriting UML2)?
>>
>> I.e, what I want to do is to use the EMF-based UML2 datastructures
>> together with a GMF generated diagram editor, and create a code
>> generator that modify its behaviour dependent on GUI settings
>> which does not exist in the origial EMF model (I don't want to
>> touch UML2 in this case).
>>
>> Any information on this would be most helpful!
>>
>> Kind regards,
>> Johan
>>
>>
>

Thanks for the information! What I want to do is to create a code generator
for an UML product, there the code generator can adapt its behaviour based
on both the UML model stored in UML2 (which is EMF generated) as well as
some UML diagram editor (GMF generated, such as UML2Tools) specific GUI
settings which is not known to the UML2 but might be, say UML2Tools,
specific.