Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Eclipse Layout Kernel » Static Configuration(How to statically configure layout properties)
Static Configuration [message #1725343] Wed, 02 March 2016 19:35 Go to next message
Guillermo Zunino is currently offline Guillermo ZuninoFriend
Messages: 3
Registered: May 2014
Junior Member
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 10:38 Go to previous message
Miro Spönemann is currently offline Miro SpönemannFriend
Messages: 44
Registered: March 2015
Location: Kiel, Germany
Member

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: Fri Aug 17 20:39:49 GMT 2018

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

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

Back to the top