eclipse-glsp / glsp

Graphical language server platform for building web-based diagram editors
https://www.eclipse.dev/glsp
Other
203 stars 33 forks source link

LayoutEngine/ELK layouting does no work well with custom source models #1173

Open tortmayr opened 1 year ago

tortmayr commented 1 year ago

see https://github.com/eclipse-glsp/glsp/discussions/1168

planger commented 6 months ago

Sketch of a potential solution:

This will allow reusing the diagram-specific implementations of those operations so the position and routing point changes would correctly end up in whatever source model is being used.

The behavior sketched above should probably be done in the LayoutOperationHandler after it has called layout().

tortmayr commented 2 months ago

Side note: some default implementations for handling the ChangeBoundAction might not suited to handle this use case. e.g. the EMFChangeBoundsOperationHandler currently only handles top-level shapes. So layout information of ports and or sub-labels would get lost.