Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 Tools » Question about UML2Tools implementation of Association
Question about UML2Tools implementation of Association [message #471422] Tue, 04 September 2007 17:55 Go to next message
Andreas Werner is currently offline Andreas Werner
Messages: 55
Registered: July 2009
Member
Hi newsgroup,

I wanted to create a GMF editor. The metamodel is a heavyweight extension
of the UML2 metamodel.
In my extended metamodel I have a extended uml::Association with another
Class in order to use this in my GMF editor.

My problem is to define the "Source Feature" and the "Target Feature" properties
of the Link Mapping in the gmfmap file.
I took a look into the gmfmap definition "classDiagram.gmfmap" of the UML2Tools
plugin for the Link Mapping of Association.
And I found out that there is "type:Type" used as the value of the above
mentioned properties.

But this feature is actually not available for an Association!!! Is this
a workaround by the UML2Tools developers? The generated codes seem to be
patched also in order to get this work!?

Is this the right way!? Or are there other possibilities to get an Association
being used inside a GMF editor?

Please help,
Andreas
Re: Question about UML2Tools implementation of Association [message #471423 is a reply to message #471422] Wed, 05 September 2007 04:46 Go to previous message
Michael Golubev is currently offline Michael Golubev
Messages: 373
Registered: July 2009
Senior Member
Hello Andreas,

Yes, it is in fact the workaround. I don't know any other way to make it
generated,
probably with next GMF version that may support pure-design links there will
be more clean way to define it.

The Property#type feature was choosen for this because it is the actually
the feature that defines link ends,
and it produces less compilation errors after standard generation.

As a side effect of this, the actual gmf resources produces GMF validation
warnings for both
transforming map->gen and codegeneration, unfortunately, there are no ways
to suppress them.

The good news is that patching of the generated code is trivial -- just fix
all of the compilation errors, and you are done.
At least for now I don't know any issues of this fake mapping that are hidden,
say,
by casts or some other constructs that may hide actual problems.

One more problem with association is that it, by nature, does not have "source"
and "target" ends.
The selection of one end as a source is arbitrary, and is expressed in the
AssociationEndConvention class.

Regards,
Michael

> Hi newsgroup,
>
> I wanted to create a GMF editor. The metamodel is a heavyweight
> extension of the UML2 metamodel. In my extended metamodel I have a
> extended uml::Association with another Class in order to use this in
> my GMF editor.
>
> My problem is to define the "Source Feature" and the "Target Feature"
> properties of the Link Mapping in the gmfmap file. I took a look into
> the gmfmap definition "classDiagram.gmfmap" of the UML2Tools plugin
> for the Link Mapping of Association. And I found out that there is
> "type:Type" used as the value of the above mentioned properties.
>
> But this feature is actually not available for an Association!!! Is
> this a workaround by the UML2Tools developers? The generated codes
> seem to be patched also in order to get this work!?
>
> Is this the right way!? Or are there other possibilities to get an
> Association being used inside a GMF editor?
>
> Please help, Andreas
>
Re: Question about UML2Tools implementation of Association [message #608021 is a reply to message #471422] Wed, 05 September 2007 04:46 Go to previous message
Michael Golubev is currently offline Michael Golubev
Messages: 373
Registered: July 2009
Senior Member
Hello Andreas,

Yes, it is in fact the workaround. I don't know any other way to make it
generated,
probably with next GMF version that may support pure-design links there will
be more clean way to define it.

The Property#type feature was choosen for this because it is the actually
the feature that defines link ends,
and it produces less compilation errors after standard generation.

As a side effect of this, the actual gmf resources produces GMF validation
warnings for both
transforming map->gen and codegeneration, unfortunately, there are no ways
to suppress them.

The good news is that patching of the generated code is trivial -- just fix
all of the compilation errors, and you are done.
At least for now I don't know any issues of this fake mapping that are hidden,
say,
by casts or some other constructs that may hide actual problems.

One more problem with association is that it, by nature, does not have "source"
and "target" ends.
The selection of one end as a source is arbitrary, and is expressed in the
AssociationEndConvention class.

Regards,
Michael

> Hi newsgroup,
>
> I wanted to create a GMF editor. The metamodel is a heavyweight
> extension of the UML2 metamodel. In my extended metamodel I have a
> extended uml::Association with another Class in order to use this in
> my GMF editor.
>
> My problem is to define the "Source Feature" and the "Target Feature"
> properties of the Link Mapping in the gmfmap file. I took a look into
> the gmfmap definition "classDiagram.gmfmap" of the UML2Tools plugin
> for the Link Mapping of Association. And I found out that there is
> "type:Type" used as the value of the above mentioned properties.
>
> But this feature is actually not available for an Association!!! Is
> this a workaround by the UML2Tools developers? The generated codes
> seem to be patched also in order to get this work!?
>
> Is this the right way!? Or are there other possibilities to get an
> Association being used inside a GMF editor?
>
> Please help, Andreas
>
Previous Topic:Question about UML2Tools implementation of Association
Next Topic:AndoMDA compatibility?
Goto Forum:
  


Current Time: Fri Aug 29 12:26:33 EDT 2014

Powered by FUDForum. Page generated in 0.04766 seconds