Eclipse Layout Kernel

+1 vote
asked Apr 28 in Wanted features by plantuml (255,000 points)

As explained here we are currently testing Eclipse Layout Kernel.

For example, you can now have :

(You can click on the image to see the source)

This is still an alpha release, so do not expect to much from it.

The big question for our users is: do you think it's an interesting development ?

Thanks for your feedback.

commented Apr 29 by Serge Wenger Work (14,120 points)

Yes, it is an interesting development. I check with a previous Graphviz problem (not PlantUml) and a part is solved. https://forum.plantuml.net/12543/label-position-not-correct-in-entity-diagram

commented May 3 by Martin (4,840 points)
Having a sensible arrow between two packages (i.e. not via the corners) is a refreshing improvement. (Although I don't understand why this couldn't be an option in the existing engine).

The more options for automated layout the better - what works for one diagram might not work for another - so I'm all for this.  It looks like rank is ignored in the new engine, which certainly makes things simpler, but reduces the options for minor tweaking.

I'll try to remember to try this engine on my diagrams going forward in case it improves their look; especially when heavily using packages.

2 Answers

0 votes
answered May 31 by mgrol (2,850 points)

I think this is definitely a major improvement. Especially when working with larger diagrams and linestyle ortho the lines connecting to an interface e.g. in a component diagram look less distorted than with the current layout.

A simple plain example to test this is:

@startuml
skinparam linetype ortho
!pragma layout elk

() "/api?param" as api
component component1
component component2
component component3
component component4

component1 -- api
component2 --> api
component3 --> api
component4 --> api
@enduml

commented May 31 by The-Lu (28,080 points)

Hello all,

To compare, here are the corresponding diagrams:

Without layout elk (old fashion)
With layout elk (new fashion)


If that can help,
Regards,
Th.

commented Jun 1 by The-Lu (28,080 points)

Hello All,

Here is another example, from:

Without layout elk
(old fashion)
With layout elk
(new fashion)

Regards,
Th.

commented Jun 1 by Martin (4,840 points)
As I demonstrate in the linked ticket, a small(?*) tweak to the existing engine to better handle shapes containing other shapes would improve the existing engine's effort.

(?* I have no idea whether treating containers the same as empty shapes from the point of view of connecting arrows is a small change or not; but it feels like code has been specifically written to handle containers differently which perhaps could be easily skipped on request...).
0 votes
answered Jun 1 by The-Lu (28,080 points)

Hello All,

Here is another [old] example, from:

Without layout elk
(old fashion)
With layout elk
(new fashion)

Perhaps some ajustements for direction management (left, right) will be necessary... wink
Regards,
Th.

commented Jun 1 by Martin (4,840 points)

Again, if the old engine could allow containers to be treated as regular shapes, then it would do well for this diagram...

...