Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Creating a custom auto-layout
Creating a custom auto-layout [message #1848161] Mon, 22 November 2021 17:59 Go to next message
Eclipse UserFriend
Hello,

My team and I are undergraduate students working on creating a custom auto-layout. We've read through https://www.eclipse.org/sirius/doc/developer/extensions-provide_custom-arrange-all.html and are still quite lost as to how to even start. Is there a way to see the source code of the Defualt Layout Algorithm and how its implemented?
Re: Creating a custom auto-layout [message #1848165 is a reply to message #1848161] Tue, 23 November 2021 03:13 Go to previous messageGo to next message
Eclipse UserFriend
Hi.

The actual default algorithm used by Sirius is in org.eclipse.sirius.diagram.ui.tools.internal.layout.AutoSizeAndRegionAwareGraphLayout, invoked from the concrete sub-classes of org.eclipse.sirius.diagram.ui.tools.internal.layout.provider.AbstractCompositeLayoutProvider. It extends the GMF Runtime's default algorithm, which itself is based on Draw2D's org.eclipse.draw2d.graph.DirectedGraphLayout. The code is quite complex, and as you can see it involves many layers across multiple projects.

If you are more interested in the actual algorithmic parts of diagram layouts, you should probably try to base your work on Eclipse ELK instead: https://www.eclipse.org/elk/.
Sirius includes an (optional) ELK integration, and we even have a complete blog article on how to develop a custom ELK-based layout algorithm and integrate it with Sirius: https://blog.obeosoft.com/how-to-define-your-own-elk-layout-and-use-it-in-sirius-desktop

Note that if you have further questions regarding Sirius in particular, there is a more specific forum at https://www.eclipse.org/forums/index.php/f/262/.
Re: Creating a custom auto-layout [message #1848367 is a reply to message #1848165] Mon, 29 November 2021 18:53 Go to previous message
Eclipse UserFriend
Is it possible to incorporate the semantics of a model into the layout algorithm? For example, our model has 3 different types of objects and we want to group them based on their type. Is this possible using ELK?
Previous Topic:GMF plan support to more recent eclipse releases
Next Topic:Respond to item click in popup menu
Goto Forum:
  


Current Time: Wed May 21 12:03:19 EDT 2025

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

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

Back to the top