Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Creating a custom auto-layout
Creating a custom auto-layout [message #1848161] Mon, 22 November 2021 22:59 Go to next message
Jonathan Li is currently offline Jonathan LiFriend
Messages: 10
Registered: November 2021
Junior Member
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 08:13 Go to previous messageGo to next message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 701
Registered: July 2009
Senior Member
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/.


Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Creating a custom auto-layout [message #1848367 is a reply to message #1848165] Mon, 29 November 2021 23:53 Go to previous message
Jonathan Li is currently offline Jonathan LiFriend
Messages: 10
Registered: November 2021
Junior Member
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: Thu Mar 28 18:06:07 GMT 2024

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

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

Back to the top