Hello Vlad,
And thank you for your answer.
Actually in our project, we use both mechanisms (medium and advanced
according to your terminology). We needed to add some new metaclasses
that are not related to the UML elements, so we created a metamodel
extension (so we have the code generation loop already).
As for the Profile/Stereotypes, we use it to store some additional
information for Packages, Classes, Properties, etc. We access this
additional information (read/write) quite often in our algorithm (code
generation), where every additional operation has an important impact on
the whole execution time.
And the question is if for the above case it's worth to use the
metamodel approach instead of the stereotype based one. So from an
architectural point of view we are very comfortable with the current
implementation, but I think that when running our complex code
generation algorithm the metamodel approach would improve performance.
Best regards,
Cristi.
Vlad Varnica wrote:
Hi Cristi,
I would say you have three options:
- very light option is to add directly keywords on the needed UML
metamodel element (e.g. I mean on the UML Superstructure)
- medium is to use a profile and within this profile to define
stereotype. Don't forget that the profile is only a project mechanism
and a profile should be added for each modeling project/
- advanced is to use EMF/UML codegen mechanism
We are using the light (e.g keywords) and medium (e.g. stereotype
within a profile) and don't have any performance problem. I like
keywords option because this is really easy. If your purpose is to
extend UML in order to cover DSL then profile is a better option for
my point of view.
If you want to create your DSL by creating a new model which is not
related to the UML Superstructure then I thin this is not the right
approach. You can use the UML superstructure and add stereotype and
there is no real need to create a new model superstructure which would
be specific.
Your performance problem is not related to EclipseUML2 or EMF but only
to the way you use it. My recommendation would be to keep your project
modeling extensions simple and to have as few as possible
transformation stages.
Vlad Omondo