Community
Participate
Working Groups
When GraphViewer is drawing directed connections and a connection exists in both directions, then the labels of the two connections will (may) overlap. This was with SpringLayout, and the viewer was created like this: viewer = new GraphViewer(parent, SWT.NONE); viewer.setContentProvider(new ViewContentProvider()); viewer.setLabelProvider(new ViewLabelProvider()); viewer.setLayoutAlgorithm(new SpringLayoutAlgorithm(LayoutStyles.NONE)); viewer.setConnectionStyle(ZestStyles.CONNECTIONS_DIRECTED); viewer.setNodeStyle(ZestStyles.NODES_NO_LAYOUT_RESIZE);
Created attachment 94085 [details] Edge exists in both directions This screenshot shows the labels of edges f -> n and n -> f overlapping. The labels should be DirEdge(f,n) and DirEdge(n,f) respectively.
I have been experimenting with an API to set the location of the label on a line (from 0..100). This way you could set the labels to be 75% of the way across the line (so the labels would appear close to the target nodes). Do you think this would help you?
Created attachment 94096 [details] GraphViz rendering without labels
Created attachment 94097 [details] GraphViz rendering with labels for the bidirectional connection
Yes, I think that would help. Also I think it would be good if bidirectional edges were a little apart from each other or you could create a control point and drag it manually. But maybe that would make the GraphViewer more complex than necessary? I'm not familiar with GEF -- perhaps more complex things should be done with other GEF components? I don't have a big need for this feature, I was just experimenting with Zest and found this issue. Anyway, I attached two screenshots of the same graph rendered with GraphViz, one where the bidirectional relation has labels and one where it doesn't.
(In reply to comment #5) > Also I think it would be good if bidirectional edges were a little apart from each other ... This would be a very helpful feature.
(In reply to comment #5) > Also I think it would be good if bidirectional edges were a little apart from each other... I would like this, too. The same applies if one has multiple edges between two nodes (e.g. when implementing IGraphEntityRelationshipContentProvider) regardless of their direction.
Re-assigning back to inbox, as Ian is no longer active committer.