Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Eclipse Layout Kernel » Overlapping "Edge Label" with "Edge Labels"/Nodes
Overlapping "Edge Label" with "Edge Labels"/Nodes [message #1750932] Mon, 02 January 2017 12:16 Go to next message
Mehmet Karaman is currently offline Mehmet KaramanFriend
Messages: 63
Registered: November 2012
Location: Berlin
Member
Hello,

I have tried to use the ELK Layouting with our GEF diagram. The Nodes are layouted correctly, but the edge labels are sometimes overlapping with other Edge Labels and Nodes.

The attached picture is showing a simple diagram with overlapping edge labels. In this example i've used the LayeredLayoutProvider.

index.php/fa/27992/0/

Is there any handling for overlapping "edge labels" or do i have to do some postprocessing after the layouting process especially for the edge labels?

I am using the current nightly build (0.1.0.201612260902).

Re: Overlapping "Edge Label" with "Edge Labels"/Nodes [message #1750933 is a reply to message #1750932] Mon, 02 January 2017 12:22 Go to previous messageGo to next message
Christoph Daniel Schulze is currently offline Christoph Daniel SchulzeFriend
Messages: 98
Registered: September 2015
Member
Hi Emin,

that puzzles me a bit. The layered layout provider should support labels just fine. Would you mind performing the following steps:

1. In the preferences, under "Eclipse Diagram Layout", enable the option "Debug graph output".
2. Perform a new layout run.
3. In your home folder, look for a folder named "elk". This in turn will contain a folder named "diagram_layout_engine". Find the most recent .elkg file in there and attach it to a reply in this thread.

I can then check the input to the algorithm and hopefully find out whether it's a configuration problem or a bug in the algorithm.

Cheers,
Christoph Daniel
Re: Overlapping "Edge Label" with "Edge Labels"/Nodes [message #1750934 is a reply to message #1750933] Mon, 02 January 2017 12:43 Go to previous messageGo to next message
Mehmet Karaman is currently offline Mehmet KaramanFriend
Messages: 63
Registered: November 2012
Location: Berlin
Member
It's not running in my eclipse installation, it's running in my run configuration. Where should i find this file in this case?

[Updated on: Mon, 02 January 2017 12:46]

Report message to a moderator

Re: Overlapping "Edge Label" with "Edge Labels"/Nodes [message #1750936 is a reply to message #1750934] Mon, 02 January 2017 13:05 Go to previous messageGo to next message
Mehmet Karaman is currently offline Mehmet KaramanFriend
Messages: 63
Registered: November 2012
Location: Berlin
Member
The eclipse home folder of my runtime is : ws/.metadata/.plugins/org.eclipse.pde.core/.install_folders/1478644580609/

but i didn't found a folder named "elk" nor a "diagram_layout_engine" or recursive *.elkg file search. (I am using the nightly build, not release 0.1.0)
Re: Overlapping "Edge Label" with "Edge Labels"/Nodes [message #1750938 is a reply to message #1750936] Mon, 02 January 2017 13:18 Go to previous messageGo to next message
Mehmet Karaman is currently offline Mehmet KaramanFriend
Messages: 63
Registered: November 2012
Location: Berlin
Member
rootNode.getProperties().put(CoreOptions.DEBUG_MODE, true); <-- this enabled debug output in my console. The result:



KLay Layered uses the following 24 modules:
Slot 00: org.eclipse.elk.alg.layered.intermediate.GraphTransformer
Slot 01: org.eclipse.elk.alg.layered.intermediate.EdgeAndLayerConstraintEdgeReverser
Slot 02: org.eclipse.elk.alg.layered.p1cycles.GreedyCycleBreaker
Slot 03: org.eclipse.elk.alg.layered.intermediate.LabelDummyInserter
Slot 04: org.eclipse.elk.alg.layered.p2layers.NetworkSimplexLayerer
Slot 05: org.eclipse.elk.alg.layered.intermediate.LayerConstraintProcessor
Slot 06: org.eclipse.elk.alg.layered.intermediate.LongEdgeSplitter
Slot 07: org.eclipse.elk.alg.layered.intermediate.PortSideProcessor
Slot 08: org.eclipse.elk.alg.layered.intermediate.LabelDummySwitcher
Slot 09: org.eclipse.elk.alg.layered.intermediate.PortListSorter
Slot 10: org.eclipse.elk.alg.layered.p3order.LayerSweepCrossingMinimizer
Slot 11: org.eclipse.elk.alg.layered.p3order.LayerSweepCrossingMinimizer
Slot 12: org.eclipse.elk.alg.layered.intermediate.InLayerConstraintProcessor
Slot 13: org.eclipse.elk.alg.layered.intermediate.LabelSideSelector
Slot 14: org.eclipse.elk.alg.layered.intermediate.LabelAndNodeSizeProcessor
Slot 15: org.eclipse.elk.alg.layered.intermediate.NodeMarginCalculator
Slot 16: org.eclipse.elk.alg.layered.p4nodes.bk.BKNodePlacer
Slot 17: org.eclipse.elk.alg.layered.intermediate.LayerSizeAndGraphHeightCalculator
Slot 18: org.eclipse.elk.alg.layered.p5edges.OrthogonalEdgeRouter
Slot 19: org.eclipse.elk.alg.layered.intermediate.LongEdgeJoiner
Slot 20: org.eclipse.elk.alg.layered.intermediate.LabelDummyRemover
Slot 21: org.eclipse.elk.alg.layered.intermediate.ReversedEdgeRestorer
Slot 22: org.eclipse.elk.alg.layered.intermediate.HierarchicalNodeResizingProcessor
Slot 23: org.eclipse.elk.alg.layered.intermediate.GraphTransformer
RIGHTDOWN size is 351.0
RIGHTUP size is 439.3333333333333
LEFTDOWN size is 351.0
LEFTUP size is 439.3333333333333
RIGHTDOWN is feasible: true
RIGHTUP is feasible: true
LEFTDOWN is feasible: true
LEFTUP is feasible: true
Chosen node placement: RIGHTDOWN
Blocks: {n_=[n_, n_, n_2, n_, n_6, n_], n_3=[n_3, n_5, n_8], n_7=[n_7, n_, n_11, n_]}
Classes: {n_=[n_, n_3, n_7]}
Marked edges: []

KLay Layered uses the following 24 modules:
Slot 00: org.eclipse.elk.alg.layered.intermediate.GraphTransformer
Slot 01: org.eclipse.elk.alg.layered.intermediate.EdgeAndLayerConstraintEdgeReverser
Slot 02: org.eclipse.elk.alg.layered.p1cycles.GreedyCycleBreaker
Slot 03: org.eclipse.elk.alg.layered.intermediate.LabelDummyInserter
Slot 04: org.eclipse.elk.alg.layered.p2layers.NetworkSimplexLayerer
Slot 05: org.eclipse.elk.alg.layered.intermediate.LayerConstraintProcessor
Slot 06: org.eclipse.elk.alg.layered.intermediate.LongEdgeSplitter
Slot 07: org.eclipse.elk.alg.layered.intermediate.PortSideProcessor
Slot 08: org.eclipse.elk.alg.layered.intermediate.LabelDummySwitcher
Slot 09: org.eclipse.elk.alg.layered.intermediate.PortListSorter
Slot 10: org.eclipse.elk.alg.layered.p3order.LayerSweepCrossingMinimizer
Slot 11: org.eclipse.elk.alg.layered.p3order.LayerSweepCrossingMinimizer
Slot 12: org.eclipse.elk.alg.layered.intermediate.InLayerConstraintProcessor
Slot 13: org.eclipse.elk.alg.layered.intermediate.LabelSideSelector
Slot 14: org.eclipse.elk.alg.layered.intermediate.LabelAndNodeSizeProcessor
Slot 15: org.eclipse.elk.alg.layered.intermediate.NodeMarginCalculator
Slot 16: org.eclipse.elk.alg.layered.p4nodes.bk.BKNodePlacer
Slot 17: org.eclipse.elk.alg.layered.intermediate.LayerSizeAndGraphHeightCalculator
Slot 18: org.eclipse.elk.alg.layered.p5edges.OrthogonalEdgeRouter
Slot 19: org.eclipse.elk.alg.layered.intermediate.LongEdgeJoiner
Slot 20: org.eclipse.elk.alg.layered.intermediate.LabelDummyRemover
Slot 21: org.eclipse.elk.alg.layered.intermediate.ReversedEdgeRestorer
Slot 22: org.eclipse.elk.alg.layered.intermediate.HierarchicalNodeResizingProcessor
Slot 23: org.eclipse.elk.alg.layered.intermediate.GraphTransformer
RIGHTDOWN size is 351.0
RIGHTUP size is 439.3333333333333
LEFTDOWN size is 351.0
LEFTUP size is 439.3333333333333
RIGHTDOWN is feasible: true
RIGHTUP is feasible: true
LEFTDOWN is feasible: true
LEFTUP is feasible: true
Chosen node placement: RIGHTDOWN
Blocks: {n_=[n_, n_, n_2, n_, n_6, n_], n_3=[n_3, n_5, n_8], n_7=[n_7, n_, n_11, n_]}
Classes: {n_=[n_, n_3, n_7]}
Marked edges: []
Re: Overlapping "Edge Label" with "Edge Labels"/Nodes [message #1751109 is a reply to message #1750934] Wed, 04 January 2017 14:29 Go to previous messageGo to next message
Christoph Daniel Schulze is currently offline Christoph Daniel SchulzeFriend
Messages: 98
Registered: September 2015
Member
Emin M. wrote on Mon, 02 January 2017 12:43
It's not running in my eclipse installation, it's running in my run configuration. Where should i find this file in this case?


Emin, how exactly are you invoking layout? Reading your first post again it seems that you are calling the layout provider directly? If that is the case, you should find the elk folder in your home folder after setting the DEBUG option you found. Inside it will be a folder called layered, which will contain a file named *-finished.json. The content of that file would be helpful.
Re: Overlapping "Edge Label" with "Edge Labels"/Nodes [message #1751195 is a reply to message #1751109] Thu, 05 January 2017 14:49 Go to previous messageGo to next message
Mehmet Karaman is currently offline Mehmet KaramanFriend
Messages: 63
Registered: November 2012
Location: Berlin
Member
Thanks for your reply. The debug file is attached. I have tried to produce some more examples.

It seems that the layouting algorithm produces in some places correct edge label layouts and in other places it can't layout the edge labels.


The edge labels are set with the property: CoreOptions.EDGE_LABELS_PLACEMENT = EdgeLabelPlacement.CENTER (but doesn't effect anything, because the edge labels are layouted on the head position)

The example:
index.php/fa/28029/0/

[Updated on: Thu, 05 January 2017 15:04]

Report message to a moderator

Re: Overlapping "Edge Label" with "Edge Labels"/Nodes [message #1751307 is a reply to message #1751195] Sat, 07 January 2017 13:20 Go to previous messageGo to next message
Christoph Daniel Schulze is currently offline Christoph Daniel SchulzeFriend
Messages: 98
Registered: September 2015
Member
Sadly I just noticed that the debug output written by ELK Layered doesn't include information about the labels. Anyway, I tried to reproduce the problem, but at least with the current nightly center edge labels seem to be working just fine. One thing to do would be to install the ELK SDK and include that in your run configuration. That will give you access to the Layout Graph View. That view displays the result of the layout algorithm as it comes out of ELK, so you can check if the labels are placed properly there. If they are, the problem must be with the way you apply label coordinates back to your editor.
Re: Overlapping "Edge Label" with "Edge Labels"/Nodes [message #1751446 is a reply to message #1751307] Tue, 10 January 2017 13:15 Go to previous messageGo to next message
Mehmet Karaman is currently offline Mehmet KaramanFriend
Messages: 63
Registered: November 2012
Location: Berlin
Member
I've installed ELK debug and compared the results. I've serialized the kgraph file and loaded into the Layout view.

The next figure shows a picture from my view and the layout result from the layout graph view:
index.php/fa/28077/0/

I've checked the file "EnterStore" and "ExitStore" aren't in the same Y coordinate (part of the *.kgraph model file):
<children identifier="EnterStore" height="39.0" width="106.0" x="48.0" y="50.75" outgoingEdges="//@containedEdges.4 //@containedEdges.5" incomingEdges="//@containedEdges.2"/>
<children identifier="Buying" height="39.0" width="75.0" x="307.7833333333333" y="24.0" outgoingEdges="//@containedEdges.0 //@containedEdges.1" incomingEdges="//@containedEdges.5"/>
<children identifier="ExitStore" height="39.0" width="93.0" x="621.25" y="71.0" outgoingEdges="//@containedEdges.3" incomingEdges="//@containedEdges.0 //@containedEdges.4"/>

Does the layout graph View relayout the kgraph model after importing or what happens here?
  • Attachment: compare.png
    (Size: 17.20KB, Downloaded 599 times)

[Updated on: Tue, 10 January 2017 13:58]

Report message to a moderator

Re: Overlapping "Edge Label" with "Edge Labels"/Nodes [message #1751460 is a reply to message #1751446] Tue, 10 January 2017 14:33 Go to previous messageGo to next message
Christoph Daniel Schulze is currently offline Christoph Daniel SchulzeFriend
Messages: 98
Registered: September 2015
Member
Emin, yes, the view triggers a new layout run when opening a graph file. But there is no need to open a graph file. Instead, simply open the view and it will display the results of layout runs as they are triggered by your application, on the fly.

From your screenshot, it seems to me that the output generated by ELK Layered is fine. The problem seems to be that the computed label positions and edge bend points are not correctly applied back to your diagram.
Re: Overlapping "Edge Label" with "Edge Labels"/Nodes [message #1751474 is a reply to message #1751460] Tue, 10 January 2017 15:40 Go to previous messageGo to next message
Mehmet Karaman is currently offline Mehmet KaramanFriend
Messages: 63
Registered: November 2012
Location: Berlin
Member
The problem above was solved by the nightly build of yesterday. The origin problem was solved by setting the layoutmanager of my connection shape to null. It was changing after the whole layouting process the label bounds (during the validation process). Finally all my problems are solved. Thanks again for your help. Smile
Re: Overlapping "Edge Label" with "Edge Labels"/Nodes [message #1751476 is a reply to message #1751474] Tue, 10 January 2017 15:42 Go to previous message
Christoph Daniel Schulze is currently offline Christoph Daniel SchulzeFriend
Messages: 98
Registered: September 2015
Member
Emin M. wrote on Tue, 10 January 2017 15:40
It was changing after the whole layouting process the label bounds (during the validation process).


That's what I feared.

Good to hear that everything's working now!

Cheers,
Christoph Daniel
Previous Topic:MrTreeOptions class not exported?
Next Topic:Changing node order (bring to front)
Goto Forum:
  


Current Time: Thu Mar 28 09:32:05 GMT 2024

Powered by FUDForum. Page generated in 0.04131 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top