How Customized ELK to fit Sirius application? [message #1785293] |
Thu, 12 April 2018 03:50  |
Eclipse User |
|
|
|
To whom it may concern,
I want to use the ELK in Sirius application ( I am the fresh man in this field).
I installed ELK to my Eclipse, it works well using the property to do.
But some times, I want to customized some BorderNode position (ElkPort), based on the semantic model information IN/OUT. It is hard to do.
I find a presentation 'introducing the Eclipse Layout Kernel' by Christoph Daniel Schulze, which includes the same example. As following description:

But this example code just is partial code. And then I follow the 'Advanced Configuration' tutorial, find I can prepare the parameter before DiagramLayoutEngine. However, it maybe can not specify the layout option to corresponded semantic model element. (Because the mapping(LayoutMapping) can not prepared before the DiagramLayoutEngine).
Compare these, this information makes me confused.
1) What's the correct way to customized the layout, like using the semantic model information to impact the ELK? (like Daniel's presentation)
2) Is there any example/sample for ELK tool developer?
Thanks for your reply.
[Updated on: Thu, 12 April 2018 03:54] by Moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: How Customized ELK to fit Sirius application? [message #1794366 is a reply to message #1785314] |
Wed, 29 August 2018 11:33  |
Eclipse User |
|
|
|
Nicholas Kong wrote on Thu, 12 April 2018 11:56Miro Spönemann.
Can I use this ElkUtil.applyVisitors(graph, configurator) before the DiagramLayoutEngine.invokeLayout() ?
It looks different with 'Advanced Configuration'.
LayoutConfigurator configurator = new LayoutConfigurator();
// Configure layout options for a concrete graph object
configurator.configure(myVerySpecialNode)
.setProperty(CoreOptions.INTERACTIVE, true)
.setProperty(CoreOptions.PORT_CONSTRAINTS, PortConstraints.FIXED);
....
DiagramLayoutEngine.Parameters params = new DiagramLayoutEngine.Parameters();
params.addLayoutRun(configurator);
DiagramLayoutEngine.invokeLayout(workbenchPart, diagramPart, params);
Dear Nicholas. Can you share your code or explain where the workbenchPart comes from?
If I do "PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActivePart()" to get my WorkbenchPart
it gives an error "No layout connector is available for the given selection blablabla.", basically because I have multiple Dialog windows (I guess...).
Thank you for your help.
|
|
|
Powered by
FUDForum. Page generated in 0.04244 seconds