Child reference for link mapping [message #6509] |
Fri, 04 August 2006 06:29  |
Eclipse User |
|
|
|
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 #18369 is a reply to message #18139] |
Tue, 15 August 2006 06:52   |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.02997 seconds