Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Any ELK Grid Layouts in the Wild?
Any ELK Grid Layouts in the Wild? [message #1849423] Wed, 19 January 2022 13:51 Go to next message
Brandon Lewis is currently offline Brandon LewisFriend
Messages: 268
Registered: May 2012
Senior Member
I need a grid style layout where I have nodes on a grid with edges between them. None of the existing ELK layouts I've tried work as any type of grid/rectangular layout does not include edges and any layout with edges wants to force my graph into some type of directed tree.

Anyone know of any open license grid layouts out there? I've searched , but have come up empty and it's going to be a decent investment in time to figure it out to write a new one. Enough that I'll likely just write a dot graph since there are example grid layouts for that (although my app will look less great)
Re: Any ELK Grid Layouts in the Wild? [message #1849533 is a reply to message #1849423] Mon, 24 January 2022 08:39 Go to previous messageGo to next message
Laurent Redor is currently offline Laurent RedorFriend
Messages: 300
Registered: July 2009
Senior Member
Hi Brandon,
Unfortunately, ELK does not support the "grid snapping". I've asked the question in gitter in july 2019.
There is maybe a solution (not tested):
* Use one of these layouts : rectpacking or box (by ignoring edges layout). Do you tested them for the nodes layout?
* And then layout the edges "manually". If the expected edge's layout is simple, for example connect the center of the source and the target, you can probably use the Sirius extension point "org.eclipse.sirius.diagram.elk.layout.extension" to add post-treatment after the ELK layout.

It's not necessarily easy to do, but it could work.

Have you a screenshot of the expected layout result?



Laurent Redor - Obeo

Need training or professional services for Sirius?
Re: Any ELK Grid Layouts in the Wild? [message #1849787 is a reply to message #1849533] Wed, 02 February 2022 15:19 Go to previous message
Brandon Lewis is currently offline Brandon LewisFriend
Messages: 268
Registered: May 2012
Senior Member
An example of what I need is show here in a graphviz grid example:

There are two key provisions I see here:
1) weighted edges essentially push the nodes into a grid. This particular graph is undirected. All the ELK layouts seem to want things to be directed and thus the edges start shifting everything diagonally or just randomly.

2) specifying that certain nodes are in the same "rank" aka row. I can only approximate this by setting the aspect ratio of box or rect ELK layouts to specifically match my model and relying on the aspect ratio to cut off rows where I need them to. Which isn't dynamically settable as far as I can tell.

It's been a disappointed to watch the entire set of layouts fail for this task. For the time being, I'm pausing the effort for a second time and just writing a FreeMarker template to generate a Graphviz dot file. Eclipse solutions for viewing graphviz dot files are also massively overly complex (install GEF, install Zest, install JavaFX, install .. install install - all of which burden how easily I can deploy and get all the dependencies in order (which now changes every 3 months!))

Thanks for your suggestion. I tried box and rect and they, sort of, get me closer. But my critical feature to visualize involves superimposing edge network connectivity on top of a grid of nodes.
With the box and rect layouts ignoring the edges, it's just a huge entangled mess that users would hate me for if I made them manually lay it out.

While I can give a user a view now, I've completely disconnected them from my Eclipse plugin and the whole, really wonderful, Sirius environment.
Previous Topic:Undo effects outside of model changes in service calls
Next Topic:Creating new Nodes/Containers only with java code
Goto Forum:

Current Time: Sat Jun 15 10:31:34 GMT 2024

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

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

Back to the top