Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Eclipse Layout Kernel » Layout Part of Diagram (NO_LAYOUT)
Layout Part of Diagram (NO_LAYOUT) [message #1850455] Thu, 03 March 2022 14:48 Go to next message
Jonathan Li is currently offline Jonathan LiFriend
Messages: 10
Registered: November 2021
Junior Member
I'm using a slightly modified version of ELK Layered. I'd like to keep certain nodes from being used in the layout processes or if possible send them to a separate layout algorithm. Right now I'm attempting to use the layout option NO_LAYOUT by node.setProperty(LayeredOptions.NO_LAYOUT, true). However, the algorithm doesn't respect it and adds them to the layout processes.

In the o.design file, I've tried adding the No Layout option. Selecting true leads to all nodes being excluded from layout while unchecking it seems to do nothing.
Re: Layout Part of Diagram (NO_LAYOUT) [message #1850456 is a reply to message #1850455] Thu, 03 March 2022 14:57 Go to previous messageGo to next message
Sören Domrös is currently offline Sören DomrösFriend
Messages: 14
Registered: June 2021
Junior Member
I am not sure what the problem might be. I think the NO_LAYOUT option works as intended, as seen here.
Do you maybe set this option on a node that is connected to other nodes.
This should result in an UnsupportedConfigurationExceptionsince it would leave an unconnected edge.
Can you share your model from here?

What o.desgin file?

Maybe this is just enabled or disabled top-level. So either all nodes are included or all excluded.

[Updated on: Thu, 03 March 2022 15:03]

Report message to a moderator

Re: Layout Part of Diagram (NO_LAYOUT) [message #1850458 is a reply to message #1850455] Thu, 03 March 2022 15:04 Go to previous messageGo to next message
Jonathan Li is currently offline Jonathan LiFriend
Messages: 10
Registered: November 2021
Junior Member
Never mind, I got the NO_LAYOUT option to work. However, since the node is connected to the rest of the diagram the algorithm errors as it doesn't have access to that node. Is NO_LAYOUT the right way to go about doing partial layouts? I'd like to use a very simple custom layout algorithm for the part of the diagram I excluded.

I got org.eclipse.elk.core.UnsupportedGraphException: The source or the target of edge ElkEdge "O 1..1 " ElkNode "<<Process>>
Atomic_Process2" (20.0,201.0 | 170.0,62.0) -> ElkNode "Element2" (384.0,336.0 | 170.0,50.0) could not be found. This usually happens when an edge connects a node laid out by ELK Layered to a node in another level of hierarchy laid out by either another instance of ELK Layered or another layout algorithm alltogether. The former can be solved by setting the hierarchyHandling option to INCLUDE_CHILDREN.

[Updated on: Thu, 03 March 2022 15:08]

Report message to a moderator

Re: Layout Part of Diagram (NO_LAYOUT) [message #1850509 is a reply to message #1850458] Mon, 07 March 2022 08:14 Go to previous message
Sören Domrös is currently offline Sören DomrösFriend
Messages: 14
Registered: June 2021
Junior Member
That depends on what you want to do with the graph. You could of course just create two different graphs that you layout separately. Or you could do an initial layout, for example a force layout, and then programmatically set the NO_LAYOUT option to layout the other part with the layered algorithm.
Quote:
I got org.eclipse.elk.core.UnsupportedGraphException: The source or the target of edge ElkEdge "O 1..1 " ElkNode "<<Process>>
Atomic_Process2" (20.0,201.0 | 170.0,62.0) -> ElkNode "Element2" (384.0,336.0 | 170.0,50.0) could not be found. This usually happens when an edge connects a node laid out by ELK Layered to a node in another level of hierarchy laid out by either another instance of ELK Layered or another layout algorithm altogether. The former can be solved by setting the hierarchyHandling option to INCLUDE_CHILDREN.

The UnsupportedGraphException is usually thrown if the configuration is indeed not supported. If you provide an example I can have a look at it.
Previous Topic:Attempt to use elk+graphviz fails
Next Topic:ELK Sample code shows missing Options class
Goto Forum:
  


Current Time: Sat Oct 12 14:08:56 GMT 2024

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

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

Back to the top