[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.modeling.gmf] How to simulate a label of a link when link and label are of different EClasses?
|
- From: alessanderbotti@xxxxxxxxx (Alessander Botti Benevides)
- Date: Wed, 3 Jun 2009 03:56:56 +0000 (UTC)
- Newsgroups: eclipse.modeling.gmf
- Organization: Eclipse
- User-agent: NewsPortal/0.36 (http://florian-amrhein.de/newsportal)
Hi people, in order to simulate labels of links, when the label and the
link are of different EClasses, I'm using the following metamodel:
EClass A // The real nodes
EClass B // The node which simulates a label
EClass C // The link which represents the real association between the
nodes
EReference source1 : A
EReference target1 : A
EClass D // The link created in order to simulate the invisible link
between the simulated label and the real association
EReference source2 : B
EReference target2 : C
Therefore, EClass A is graphically represented as a Node A; EClass B is
represented as a Node B; EClass C is represented as a Link C in which the
"Source Feature" is source1 and "Target Feature" is target1; and EClass D
is represented as a Link D in which the "Source Feature" is source2 and
"Target Feature" is target2. An example of a model is show in the "figure"
below:
[Node B] B1
|
| (Link D) D1
|
[Node A] A1---------------[Node A] A2
(Link C) C1
Now, imagine B1 as a label of C1: this is exactly the appearance I want to
create for D1, D1 shall only be visible when the user moves B1. How can I
do that? Also, B1 and D1 are created automatically when I create C1, so I
have no control of where D1 connects on C1. Is there a way I can specify
where it will connects on C1, just like the "Alignment Facet BEGINNING"
and "Alignment Facet END" that works in "Diagram Labels"? An example is
show below, where the nodes B1 and B2 and the links D1 and D2, connected
on the link C1, are simulating that B1 and B2 are labels of C1, with
"Alignment Facet BEGINNING" and "Alignment Facet END":
[Node B] B1 [Node B] B2
| |
(Link D) D2 | | (Link D) D1
| |
[Node A] A1---------------[Node A] A2
(Link C) C1
Any help is very appreciated because I'm having this problem for years!!!
And I have no hope that Bug 138179 "Allow to define labels based on
attributes of referenced objects"
(https://bugs.eclipse.org/bugs/show_bug.cgi?id=138179) will be fixed :(
Best regards,
Alessander