[SOLVED] Connection with label not appearing [message #650376] |
Mon, 24 January 2011 16:48 |
akoeck Messages: 62 Registered: December 2010 |
Member |
|
|
I've a connection with a label with static content. But this connection is not appearing. Every other connection is there, but only those with the label are not showing.
In the gmgraph i've the following:
Canvas
- Figure Gallery
- - Figure Descriptor Connection
- - - PolylineConnection Con
- - - - Label ConLabel
- - - ChildAccess getConLabel
- Connection Con
- Diagram Label ConLabel
In the mapping:
Link Mapping
- Label Mapping
I'm not sure if I could use every of those different Label Mappings (Label, Feature Label, Design Label, Expression Label).
In the code it looks like this:
public ConnectionFigure extends PolylineConnectionEx
{
private WrappingLabel conLabel;
public UpdateConnectionFigure(){
createContents();
}
private void createContents(){
ConnectionEndpointLocator el = new ConnectionEndpointLocator(this, true);
el.setVDistance(15);
conLabel = new WrappingLabel();
conLabel.setText("FOO");
this.add(conLabel, el);
}
public WrappingLabel getConLabel(){
return conLabel;
}
}
I hope you can help me.
I'm also wondering if it's possible to tell the connection that it should use this Tree or Rectengular layout by default.
[Updated on: Tue, 25 January 2011 13:55] Report message to a moderator
|
|
|
|
Re: Connection with label not appearing [message #650540 is a reply to message #650480] |
Tue, 25 January 2011 13:34 |
akoeck Messages: 62 Registered: December 2010 |
Member |
|
|
Romain Bioteau wrote on Tue, 25 January 2011 03:35 | HI,
Did you had the ConnectionEndpointLocator yourself or is it generated ?
I Think you should remove it and use the GMFGen to set the location of your Connection label :
Go in the Gen Diagram Tree :
- Gen Link YourConnection
- Gen Link Label YourLabel
- Parent Assigned Viewmap
- Add a Label Offset children
HTH
Romain
|
Thanks for the help, but this does not work.
The connection is still not showing.
I've checked the *.model and *.model_diagramm file.
There i can see the connections, but somehow the type for the connection in the model file is missing. I've to say that I'm using constraints do use different figures for my model and choose the correct figure via an enum. The connections without label are showing and have also written their type in the *.model file.
I just found out, that when i delete the label in the gmfgraph and the mapping the connection is still not appearing. Only the model is written into to model file, but in the diagram file i can't see this connection, only the others.
------------------------
I found the solution. It's a bit embarrising but i have just forgotten to regenerate the modelcode after adding more elements to the enum.
[Updated on: Tue, 25 January 2011 13:54] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03812 seconds