Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Eclipse Layout Kernel » Unclonnable property - ElkReflect
Unclonnable property - ElkReflect [message #1802038] Thu, 31 January 2019 08:21 Go to next message
Baptiste Colin is currently offline Baptiste ColinFriend
Messages: 5
Registered: January 2019
Junior Member
Hi everybody,

When trying to layout or convert a graph to JSON format, I get the following error :

2019-01-31 10:02:53,032 [AWT-EventQueue-0] ERROR GENERAL - Unhandled exception - Couldn't clone property 'org.eclipse.elk.junctionPoints'. Make sure it's type is registered with the ElkReflect utility class.
java.lang.IllegalStateException: Couldn't clone property 'org.eclipse.elk.junctionPoints'. Make sure it's type is registered with the ElkReflect utility class.
at org.eclipse.elk.graph.properties.Property.getDefault(Property.java:140)


The error above happened when trying to convert the graph to a JSON. The same message occured, but with "org.eclipse.elk.nodeLabels.padding" instead of "org.eclipse.elk.junctionPoints", when trying to layout the graph with LayeredLayoutProvider.

This doesn't happen when I'm operating over a simple graph (5 nodes, 6 edges, some ports), but happens on a more complex graph (built by iterating over a SysML model).

How should I proceed so that "types are registered with the ElkReflect utility class", as the error message says ? Is it a dependency problem or does it have to something to do with the graph construction process ?
I'm only using basic ELK functions for constructing my graph (ElkGraphFactory.createElkNode, ElkGraphFactory.createSElkPort, ElkGraphUtil.createSimpleEdge).

Thanks in advance
Re: Unclonnable property - ElkReflect [message #1802100 is a reply to message #1802038] Fri, 01 February 2019 07:37 Go to previous messageGo to next message
Miro Spönemann is currently offline Miro SpönemannFriend
Messages: 71
Registered: March 2015
Location: Kiel, Germany
Member

In what context are you using ELK? As Eclipse plugin, or standalone Java?
Re: Unclonnable property - ElkReflect [message #1802102 is a reply to message #1802100] Fri, 01 February 2019 07:57 Go to previous messageGo to next message
Baptiste Colin is currently offline Baptiste ColinFriend
Messages: 5
Registered: January 2019
Junior Member
I'm using ELK in a standalone Java application.

I should also mention that the environment setup is a bit peculiar, and the ELK .jar were not implicitly part of the environment so I had to import them by hand.
The simpler case I mentioned (with a small graph of 5 nodes, 6 edges) took place in another standalone Java app where the environment was more usual and the import of ELK could be done normally as ELK was implicitly part of the environment.

My understanding is that my bug stems from the fact that ELK tries to access classes that are part of the org.eclipse.elk package, however my class path only contains subpackaees such as org.eclipse.elk.alg or org.eclipse.elk.core.
This makes me think I should import the whole org.eclipse.elk package, but I can't find it anywhere. Does this mean my import approach should be different ?
Re: Unclonnable property - ElkReflect [message #1802104 is a reply to message #1802102] Fri, 01 February 2019 08:54 Go to previous messageGo to next message
Miro Spönemann is currently offline Miro SpönemannFriend
Messages: 71
Registered: March 2015
Location: Kiel, Germany
Member

You need to initialize the layout metadata service with the algorithm you'd like to use:

LayoutMetaDataService.getInstance().registerLayoutMetaDataProviders(
		new ForceMetaDataProvider(),
		new LayeredMetaDataProvider(),
		new MrTreeMetaDataProvider(),
		new RadialMetaDataProvider(),
		new StressMetaDataProvider(),
		new PolyominoOptions(),
		new DisCoMetaDataProvider(),
		new SporeMetaDataProvider()
)
Re: Unclonnable property - ElkReflect [message #1802220 is a reply to message #1802104] Mon, 04 February 2019 14:14 Go to previous message
Baptiste Colin is currently offline Baptiste ColinFriend
Messages: 5
Registered: January 2019
Junior Member
Thank you !
Previous Topic:Mixing nodes to be adjusted with nodes with fixed positions in Elk Layered
Next Topic:Creating a graph with containers of SubGraphs
Goto Forum:
  


Current Time: Sat Apr 17 05:33:42 GMT 2021

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

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

Back to the top