Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Child reference for link mapping
Child reference for link mapping [message #6509] Fri, 04 August 2006 06:29 Go to next message
Eclipse UserFriend
Originally posted by: jw377.safe-mail.net

Hello!

In GMFMAP I (think I) need a child reference referencing a link mapping.
Scenario:

UML associations within UML packages. If I have two classes A and B,
which are connected by an association and I move the two classes into a
package, the association remains outside the package (in the domain model).

I think, I have to define a child reference below the package node
mapping, which references the association's link mapping, because the
link mapping for the association has a domain meta element (association)
which must be moved from UML model to UML package when moving its owned
ends (classes A and B) from the model into a package.

But in GMFMAP I can only select node mappings for referenced child.

Any ideas?

Thomas
Re: Child reference for link mapping [message #14525 is a reply to message #6509] Wed, 09 August 2006 23:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hht.163.com

i have the same problem now......
"Thomas Weiler" <jw377@safe-mail.net> ????
news:eav7ib$sdb$1@utils.eclipse.org...
> Hello!
>
> In GMFMAP I (think I) need a child reference referencing a link mapping.
> Scenario:
>
> UML associations within UML packages. If I have two classes A and B, which
> are connected by an association and I move the two classes into a package,
> the association remains outside the package (in the domain model).
>
> I think, I have to define a child reference below the package node
> mapping, which references the association's link mapping, because the link
> mapping for the association has a domain meta element (association) which
> must be moved from UML model to UML package when moving its owned ends
> (classes A and B) from the model into a package.
>
> But in GMFMAP I can only select node mappings for referenced child.
>
> Any ideas?
>
> Thomas
Re: Child reference for link mapping [message #17299 is a reply to message #6509] Mon, 14 August 2006 12:08 Go to previous messageGo to next message
Eclipse UserFriend
Hello Thomas,

It is not possible now to describe this behavior in .gmfmap model now.

> I think, I have to define a child reference below the package node
> mapping, which references the association's link mapping, because the
I do not think this exact solution will help because AFAIU we should expose
the possibility to describe some (quite generic) changes in the model which
should be performed on some event (like moving link end(s) to another package).

-----------------
Alex Shatalin
Re: Child reference for link mapping [message #18139 is a reply to message #17299] Mon, 14 August 2006 14:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jw377.safe-mail.net

Hi Alex!

Alex Shatalin schrieb:
> I do not think this exact solution will help because AFAIU we should
> expose the possibility to describe some (quite generic) changes in the
> model which should be performed on some event (like moving link end(s)
> to another package).

But is this not a similar use case to nodes (e.g. UML classes) which can
be added to the canvas (UML Model) as well as to sub-containers (UML
Packages)? In this case we define a top-node for the UML class and a
child reference to this node under the top-node definition for the UML
package.

Now if one moves a UML class from the model to a (sub-)package it is
removed from the packagedElements of the model and added to the
packagedElements of the UML package.

The same should happen, if one moves an UML association from the model
to a package or if one connects two classes within a package by an
association.

I think the only case which needs special investigation is, if the two
link ends are not in the same container. In general the link (resp. its
corresponding semantical element) needs to be added to the container,
which contains the containers of its link ends.

Thomas
Re: Child reference for link mapping [message #18369 is a reply to message #18139] Tue, 15 August 2006 06:52 Go to previous messageGo to next message
Eclipse UserFriend
Hello Thomas,

> But is this not a similar use case to nodes (e.g. UML classes) which
> can be added to the canvas (UML Model) as well as to sub-containers
I think, not. Because in this case you are moving the class itself, but in
case of association link you should move this link on moving one of the ends.
Imagine you’d like to implement the following functionality for Ecore diagram:
move some class to another package and in the same time automatically move
all the classes extending this class together with it. This situation is
similar to the problem with link. I can not see how child references for
nodes will help you to implement it.

> Now if one moves a UML class from the model to a (sub-)package it is
> removed from the packagedElements of the model and added to the
> packagedElements of the UML package.
Nobody is going to move association link itself – you are talking about the
way to do it automatically AFAIU. BTW, then model explorer view will be generated
for GMF, we’ll be able to move such a links directly in this tree.

> I think the only case which needs special investigation is, if the two
> link ends are not in the same container. In general the link (resp.
> its corresponding semantical element) needs to be added to the
> container, which contains the containers of its link ends.
I think this question is not so simple. AFAIU, you are talking about some
logic to found closest common container for association link. I think there
could be another use cases (not in UML meta-model) and it’ll be not so easy
to cover all of them, so I suggest writing code manually.

-----------------
Alex Shatalin
Re: Child reference for link mapping [message #18401 is a reply to message #18369] Tue, 15 August 2006 07:43 Go to previous message
Eclipse UserFriend
Originally posted by: jw377.safe-mail.net

Hi Alex!

Alex Shatalin schrieb:
> I think, not. Because in this case you are moving the class itself, but
> in case of association link you should move this link on moving one of
> the ends. Imagine you’d like to implement the following functionality
> for Ecore diagram: move some class to another package and in the same
> time automatically move all the classes extending this class together
> with it. This situation is similar to the problem with link. I can not
> see how child references for nodes will help you to implement it.

OK, I see your point. You are right.

Thomas
Previous Topic:Why do generated SemanticEditPolicies call IElementType?
Next Topic:Multiple diagrams
Goto Forum:
  


Current Time: Fri Apr 25 22:11:46 EDT 2025

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

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

Back to the top