Modify a label from a figure (rectangle) when a connection is made [message #199790] |
Fri, 01 August 2008 11:46 |
Eclipse User |
|
|
|
Originally posted by: florin.botis.gmail.com
Hi all,
I wonder how i can do this: For example I have class A<>-----------B.
This is how my diagram looks like before to add the connection between A and
B.
------------------ ---------------------
- A - -
B -
- ---------------- - -
-
- -
- - -
-
- - -
-
-------------------- ---------------------
After I add the connection I want instead of "b:null" from the A figure to
appear something like "b: someText".
Can I do that in GMF?
Or if this is to complicated, how i can use a specific popup menu for every
figure. That means that when I right click in A figure a popup menu will
appear with some Menu Items like "Add B,","Delete B" etc. and then if I
press "Add B" on the diagram will appear a figure B and a connection from A
to B.
Thanks in advance,
Florin Botis
|
|
|
|
Re: Modify a label from a figure (rectangle) when a connection is made [message #199871 is a reply to message #199798] |
Fri, 01 August 2008 13:13 |
Eclipse User |
|
|
|
Originally posted by: florin.botis.gmail.com
> For now you have tom implement and plug in custom parser for it. In
> .gmfmap use LabelMapping if you are goint to plug in proprietary parser
> for a label.
For example I have Node A, Node B and a Connection AB.
In .gmfgraph for Node A I have a Rectangle and a Label/ Child Acces.
In .gmfmap I have 2 Top Node References for A and B and a Link Mapping for
Connection AB.
In the Link Mapping I have also a Label Mapping with the Diagram Label which
coresponds with the label from A figure.
When I'm generating the code I have an error because the connection class
tries to call a method which doesn't exists (the child acces method
"getFigureLabelName()"). So I have to write a parser? Where? How does it
work?
Thanks for your time,
Florin Botis
>> Or if this is to complicated, how i can use a specific popup menu for
> Well, use standard Eclipse extension points to plug in popup menu +
> implement creation of the element and link by your own code.
>
> -----------------
> Alex Shatalin
>
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.02172 seconds