Eclipse Layout Kernel

+2 votes
asked Apr 28 in Wanted features by plantuml (259,840 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,180 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 (5,280 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.

3 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 (33,360 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 (33,360 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 (5,280 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 (33,360 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 (5,280 points)

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

0 votes
answered Sep 2 by The-Lu (33,360 points)

Hello PlantUML team,

  • What is the algorithm with ELK for placement of nestabled elements?

See this example:

Code Without ELKWith ELK
node Node {
  artifact artifact_01
  artifact artifact_02
  artifact artifact_03
  artifact artifact_04
  artifact artifact_05
  artifact artifact_06
  artifact artifact_07
  artifact artifact_08
  artifact artifact_09
  artifact artifact_10
  artifact artifact_11
  artifact artifact_12
  artifact artifact_13
  artifact artifact_14
  artifact artifact_15
}
  • What are the reason of the shift between the columns?

Regards,
Th.

...