Home » Modeling » Eclipse Layout Kernel » [ELK] SOUTH ports and NORTH ports are overlapped
| | | | | |
Re: [ELK] SOUTH ports and NORTH ports are overlapped [message #1790925 is a reply to message #1790889] |
Wed, 20 June 2018 09:33 |
lee lucky Messages: 26 Registered: October 2017 |
Junior Member |
|
|
Hi,
I use ELK 0.4.0 with the following properties to layout my diagram, I met an exception:
Properties:
.setProperty(CoreOptions.ALGORITHM, "org.eclipse.elk.alg.layered")
.setProperty(CoreOptions.DIRECTION, Direction.RIGHT)
.setProperty(CoreOptions.PORT_LABELS_PLACEMENT, PortLabelPlacement.INSIDE)
.setProperty(LayeredOptions.PORT_CONSTRAINTS, PortConstraints.FIXED_SIDE)
.setProperty(CoreOptions.NODE_SIZE_OPTIONS, EnumSet.of(SizeOptions.MINIMUM_SIZE_ACCOUNTS_FOR_PADDING))
.setProperty(CoreOptions.NODE_SIZE_CONSTRAINTS, EnumSet.allOf(SizeConstraint.class))
.setProperty(CoreOptions.NODE_LABELS_PLACEMENT, NodeLabelPlacement.insideTopCenter())
.setProperty(LayeredOptions.MERGE_EDGES, true).setProperty(LayeredOptions.MERGE_HIERARCHY_EDGES, true)
.setProperty(CoreOptions.HIERARCHY_HANDLING, HierarchyHandling.INCLUDE_CHILDREN);
Exception:
java.lang.NullPointerException
at org.eclipse.elk.alg.layered.p3order.AbstractBarycenterPortDistributor.updateNodePositions(AbstractBarycenterPortDistributor.java:325)
at org.eclipse.elk.alg.layered.p3order.AbstractBarycenterPortDistributor.distributePortsWhileSweeping(AbstractBarycenterPortDistributor.java:85)
at org.eclipse.elk.alg.layered.p3order.LayerSweepCrossingMinimizer.sweepReducingCrossings(LayerSweepCrossingMinimizer.java:248)
at org.eclipse.elk.alg.layered.p3order.LayerSweepCrossingMinimizer.sweepInHierarchicalNode(LayerSweepCrossingMinimizer.java:287)
at org.eclipse.elk.alg.layered.p3order.LayerSweepCrossingMinimizer.sweepInHierarchicalNodes(LayerSweepCrossingMinimizer.java:266)
at org.eclipse.elk.alg.layered.p3order.LayerSweepCrossingMinimizer.sweepReducingCrossings(LayerSweepCrossingMinimizer.java:250)
at org.eclipse.elk.alg.layered.p3order.LayerSweepCrossingMinimizer.minimizeCrossingsWithCounter(LayerSweepCrossingMinimizer.java:200)
at org.eclipse.elk.alg.layered.p3order.LayerSweepCrossingMinimizer.compareDifferentRandomizedLayouts(LayerSweepCrossingMinimizer.java:185)
at org.eclipse.elk.alg.layered.p3order.LayerSweepCrossingMinimizer.lambda$1(LayerSweepCrossingMinimizer.java:131)
at org.eclipse.elk.alg.layered.p3order.LayerSweepCrossingMinimizer.minimizeCrossings(LayerSweepCrossingMinimizer.java:143)
at org.eclipse.elk.alg.layered.p3order.LayerSweepCrossingMinimizer.process(LayerSweepCrossingMinimizer.java:121)
at org.eclipse.elk.alg.layered.p3order.LayerSweepCrossingMinimizer.process(LayerSweepCrossingMinimizer.java:1)
at org.eclipse.elk.alg.layered.ElkLayered.hierarchicalLayout(ElkLayered.java:241)
at org.eclipse.elk.alg.layered.ElkLayered.doCompoundLayout(ElkLayered.java:182)
at org.eclipse.elk.alg.layered.LayeredLayoutProvider.layout(LayeredLayoutProvider.java:58)
at org.eclipse.elk.core.RecursiveGraphLayoutEngine.executeAlgorithm(RecursiveGraphLayoutEngine.java:222)
at org.eclipse.elk.core.RecursiveGraphLayoutEngine.layoutRecursively(RecursiveGraphLayoutEngine.java:197)
at org.eclipse.elk.core.RecursiveGraphLayoutEngine.layout(RecursiveGraphLayoutEngine.java:76)
at org.eclipse.elk.core.service.DiagramLayoutEngine.layout(DiagramLayoutEngine.java:718)
at org.eclipse.elk.core.service.DiagramLayoutEngine.layout(DiagramLayoutEngine.java:650)
at org.eclipse.elk.core.service.DiagramLayoutEngine$1.execute(DiagramLayoutEngine.java:400)
at org.eclipse.elk.core.service.util.MonitoredOperation$1.run(MonitoredOperation.java:236)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
In my source codes, I just customized my port side according to my semantic model information, and I did not changed the source codes of ELK 0.4.0.
I have found that if "LayeredOptions.PORT_CONSTRAINTS, PortConstraints.FIXED_SIDE" and "CoreOptions.HIERARCHY_HANDLING, HierarchyHandling.INCLUDE_CHILDREN" both exist, the exception will occur, Do you met this kind of problem? Did I have something wrong with my configuration or it is a bug? Please give me some suggestions.
Thanks and hope for your reply.
[Updated on: Wed, 20 June 2018 09:35] Report message to a moderator
|
|
|
Re: [ELK] SOUTH ports and NORTH ports are overlapped [message #1790928 is a reply to message #1790921] |
Wed, 20 June 2018 09:53 |
lee lucky Messages: 26 Registered: October 2017 |
Junior Member |
|
|
Hi,
I use ELK 0.4.0 with the following properties to layout my diagram, I met an exception:
Properties:
.setProperty(CoreOptions.ALGORITHM, "org.eclipse.elk.alg.layered")
.setProperty(CoreOptions.DIRECTION, Direction.RIGHT)
.setProperty(CoreOptions.PORT_LABELS_PLACEMENT, PortLabelPlacement.INSIDE)
.setProperty(LayeredOptions.PORT_CONSTRAINTS, PortConstraints.FIXED_SIDE)
.setProperty(CoreOptions.NODE_SIZE_OPTIONS, EnumSet.of(SizeOptions.MINIMUM_SIZE_ACCOUNTS_FOR_PADDING))
.setProperty(CoreOptions.NODE_SIZE_CONSTRAINTS, EnumSet.allOf(SizeConstraint.class))
.setProperty(CoreOptions.NODE_LABELS_PLACEMENT, NodeLabelPlacement.insideTopCenter())
.setProperty(LayeredOptions.MERGE_EDGES, true).setProperty(LayeredOptions.MERGE_HIERARCHY_EDGES, true)
.setProperty(CoreOptions.HIERARCHY_HANDLING, HierarchyHandling.INCLUDE_CHILDREN);
Exception:
java.lang.NullPointerException
at org.eclipse.elk.alg.layered.p3order.AbstractBarycenterPortDistributor.updateNodePositions(AbstractBarycenterPortDistributor.java:325)
at org.eclipse.elk.alg.layered.p3order.AbstractBarycenterPortDistributor.distributePortsWhileSweeping(AbstractBarycenterPortDistributor.java:85)
at org.eclipse.elk.alg.layered.p3order.LayerSweepCrossingMinimizer.sweepReducingCrossings(LayerSweepCrossingMinimizer.java:248)
at org.eclipse.elk.alg.layered.p3order.LayerSweepCrossingMinimizer.sweepInHierarchicalNode(LayerSweepCrossingMinimizer.java:287)
at org.eclipse.elk.alg.layered.p3order.LayerSweepCrossingMinimizer.sweepInHierarchicalNodes(LayerSweepCrossingMinimizer.java:266)
at org.eclipse.elk.alg.layered.p3order.LayerSweepCrossingMinimizer.sweepReducingCrossings(LayerSweepCrossingMinimizer.java:250)
at org.eclipse.elk.alg.layered.p3order.LayerSweepCrossingMinimizer.minimizeCrossingsWithCounter(LayerSweepCrossingMinimizer.java:200)
at org.eclipse.elk.alg.layered.p3order.LayerSweepCrossingMinimizer.compareDifferentRandomizedLayouts(LayerSweepCrossingMinimizer.java:185)
at org.eclipse.elk.alg.layered.p3order.LayerSweepCrossingMinimizer.lambda$1(LayerSweepCrossingMinimizer.java:131)
at org.eclipse.elk.alg.layered.p3order.LayerSweepCrossingMinimizer.minimizeCrossings(LayerSweepCrossingMinimizer.java:143)
at org.eclipse.elk.alg.layered.p3order.LayerSweepCrossingMinimizer.process(LayerSweepCrossingMinimizer.java:121)
at org.eclipse.elk.alg.layered.p3order.LayerSweepCrossingMinimizer.process(LayerSweepCrossingMinimizer.java:1)
at org.eclipse.elk.alg.layered.ElkLayered.hierarchicalLayout(ElkLayered.java:241)
at org.eclipse.elk.alg.layered.ElkLayered.doCompoundLayout(ElkLayered.java:182)
at org.eclipse.elk.alg.layered.LayeredLayoutProvider.layout(LayeredLayoutProvider.java:58)
at org.eclipse.elk.core.RecursiveGraphLayoutEngine.executeAlgorithm(RecursiveGraphLayoutEngine.java:222)
at org.eclipse.elk.core.RecursiveGraphLayoutEngine.layoutRecursively(RecursiveGraphLayoutEngine.java:197)
at org.eclipse.elk.core.RecursiveGraphLayoutEngine.layout(RecursiveGraphLayoutEngine.java:76)
at org.eclipse.elk.core.service.DiagramLayoutEngine.layout(DiagramLayoutEngine.java:718)
at org.eclipse.elk.core.service.DiagramLayoutEngine.layout(DiagramLayoutEngine.java:650)
at org.eclipse.elk.core.service.DiagramLayoutEngine$1.execute(DiagramLayoutEngine.java:400)
at org.eclipse.elk.core.service.util.MonitoredOperation$1.run(MonitoredOperation.java:236)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
In my source codes, I just customized my port side according to my semantic model information, and I did not changed the source codes of ELK 0.4.0.
I have found that if "LayeredOptions.PORT_CONSTRAINTS, PortConstraints.FIXED_SIDE" and "CoreOptions.HIERARCHY_HANDLING, HierarchyHandling.INCLUDE_CHILDREN" both exist, the exception will occur, Do you met this kind of problem? Did I have something wrong with my configuration or it is a bug? Please give me some suggestions.
Thanks and hope for your reply.
|
|
|
Goto Forum:
Current Time: Thu Dec 26 23:51:48 GMT 2024
Powered by FUDForum. Page generated in 0.04416 seconds
|