Skip to main content



      Home
Home » Modeling » Eclipse Layout Kernel » Static Configuration(How to statically configure layout properties)
Static Configuration [message #1725343] Wed, 02 March 2016 14:35 Go to next message
Eclipse UserFriend
Hi,

The getting started guide (https://www.eclipse.org/elk/getting-started.php) mentions "org.eclipse.elk.core.layoutConfigs" extension point as a way to statically configure options for layout.

Looking at commits that extension point has been removed. I couldn't find a replacement for that.

I'm working on Sirius editor and I want to use some specific layout properties for every instance of the editor (statically) as soon as the editor is created (first layout).

Sirius choose the correct ELK layoutProvider from GMF extension point, but it layouts with default properties. I looked at ELK code and I didn't found any hook were I can put my custom properties before the first layout is applied.

I can trigger a relayout with my properties set but only after the diagram is created, which seems not the best way.

Thanks in advance!
Re: Static Configuration [message #1726501 is a reply to message #1725343] Mon, 14 March 2016 06:38 Go to previous message
Eclipse UserFriend
The whole API has been massively restructured, and the current state is not documented yet. The easiest way to statically configure the layout would be to set the properties in your custom IDiagramLayoutConnector implementation, e.g. by subclassing GmfDiagramLayoutConnector:

https://github.com/eclipse/elk/blob/master/plugins/org.eclipse.elk.conn.gmf/src/org/eclipse/elk/conn/gmf/GmfDiagramLayoutConnector.java

That implementation is registered with an ILayoutSetup in the org.eclipse.elk.core.service.layoutConnectors extension point.
Previous Topic:Optimizing/making shorter connections in a graph
Next Topic:Node Resize when doing auto layout
Goto Forum:
  


Current Time: Tue May 13 14:15:40 EDT 2025

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

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

Back to the top