Bug 547869

Summary: We can not access the class of diagram at ElkGraphlayout
Product: [Modeling] Sirius Reporter: Bruno Oliveira <brnonm>
Component: CoreAssignee: Project inbox <sirius.core-inbox>
Status: UNCONFIRMED --- QA Contact:
Severity: normal    
Priority: P3 CC: laurent.redor, miro.spoenemann, pierre.guilet
Version: unspecifiedKeywords: needinfo
Target Milestone: ---   
Hardware: PC   
OS: Windows 10   
Whiteboard:

Description Bruno Oliveira CLA 2019-06-03 07:47:04 EDT
Hi,
Thats the declaration of my algorithm class :
public void layout(ElkNode layoutGraph, IElkProgressMonitor progressMonitor) {

The layoutGraph element is ELKNode type, so i'm not able to get getModel()).getElement()).getTarget() methods.
I can access children's of ELKNode too, that's ok, but i'm not able to know if one specific node (children of layoutGraph) is type of PersonDomainModel or type of BallDomainModel. Thats my big problem.

our topic name is "ELK nodes".

Regards
Comment 2 Miro Spönemann CLA 2019-06-17 07:48:00 EDT
Are you trying to implement your own layout algorithm? You should add custom Property constants for the information you are trying to access. Then you can set those properties on the graph while transforming the Sirius / GMF model into an ELK graph, and you can read the properties from the graph in the layout algorithm.
Comment 3 Miro Spönemann CLA 2019-06-17 07:49:51 EDT
See the ELK documentation:
https://www.eclipse.org/elk/documentation/tooldevelopers/graphdatastructure/layoutoptions.html