Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Re: Code generation from UML model
Re: Code generation from UML model [message #624052] Tue, 24 July 2007 16:03
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Lutz,

Sorry about the delayed response.

Some comments below ...

- James.

"Lutz Wrage" <> wrote in message
> I've been experimenting with the uml code generator a bit, and I found
> that it works fine. I want to use unions, subsets, and redefinitions in
> my metamodel. Also, I like the pluralized getters. To generate code I
> create a class diagram, create a genmodel from the *.uml file, and
> generate model code from that.
> I have two questions:
> - In the article on heavyweight extensions the UML model is converted to
> a metamodel before code generation. Does this cause any change to the
> generated code? I my experiments it did not make any difference in the
> generated model code.

You are absolutely correct, that is not required and has no impact on code
generation. It was done in the article in an attempt to be complete but it
is not required as you have discovered. I will update the article.

> - The article also recommends applying the ecore profile and applying
> epackage, eclass, etc stereotypes to the metaclasses. Again, how does
> this influence the generated model code? I couldn't see any difference
> in my simple example.

Applying the ecore profile with stereotypes etc. is required and does have
an impact on code generation.
There is extra information that can be added in the stereotypes and that
information has direct impact on code generation.
In some cases, the mere prescence of the stereotype has impact on code

> I tried to find a place in the code generator sources or templates where
> these stereotypes are processed, but couldn't find it.

Have a look at the UML2EcoreConverter in the processEcoreTaggedValue(...)
or in the body of the converter to see how the stereotypes are processed.

> Thanks,
> Lutz
Previous Topic:Re: Code generation from UML model
Next Topic:Class diagram/stereotypes problem
Goto Forum:

Current Time: Sat Apr 04 12:57:57 GMT 2020

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

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

Back to the top