Community
Participate
Working Groups
Created attachment 262299 [details] Use case Using Composite Layout or Tree Ordered Layout with conditional style with image size different is to be problematic. The image is different and there are an anchor problem. As you can see on the screenshot, the opened diagram does not correspond to the layout definition. To reproduce problem, use the example joined: Create a new diagram representation on the root package present in directory sample. The edge is positioned as the screenshot. KO! You can replace the composite Layout by the OrderedTreeLayout. Children Expression: feature:eSubpackages Node mapping: Package With this layout there is a second problem, you can't aligned the edges! As you can see on screenshot OrderedTreeLayoutProblemAligned.png
Created attachment 262300 [details] Bad Layout
Created attachment 262301 [details] Ordered Tree Layout Problem edge alignment
Warning! It would be necessary to create several time the representation to have the problem layouting. You can see that the layouting is different each time you create a representation. The behavior seem ramdom.
I rename the issue: . from Composite Layout and Tree ordered Tree Layout have problem with conditional style . to Tree routing style issue when elements have different styles. On the attached images the nodes layout seems correct: the nodes are correctly located. The issue appears around the tree routing of the edges: one horizontal segment is not aligned with its siblings. The corresponding edge target a node with a square style while the other elements of the same level have an image style. This makes me think we should look at the DTreeRouter, DForestRouter, but also on the bendpoints and anchors set on the different nodes. Test case: we will have to complete the test data with a tree showing on the same level at least one node of each possible style with different sizes and also a list and a container. Possible workaround: use the same kind of style for the whole layouted tree (only WorkspaceImage, only BundledImages or only squares like un Capella).
A workaround is to create the diagram representation, save it and reopen the representation. The layout is ok.
Created attachment 266163 [details] Use case I replace the original use case with a new one with the 2 kinds of diagram detailed in initial description: * DiagramWithCompositeLayout * DiagramWithOrderedTreeLayout
Julien: I did not reproduce the problem for the OrderedTreeLayout. Can you try with the new use case to see if I make a mistake?
My mistake! I reproduce when trying a second time.
New Gerrit change created: https://git.eclipse.org/r/88448
At least for OrderedTreeLayout, there are 2 problems: * 1- Wrong horizontal segments. They are not all aligned. * 2- Impossible to align the horizontal segment. For "1", the problem exists only if a child is smaller than its parent. If all children are bigger that its parent, there is no longer the problem "1". But the "2" already exists: if you move one horizontal segment, the other are not aligned. This problem only exists if the children have not the same size.
Created attachment 266252 [details] Use case This project (fr.obeo.layout.design.zip) replaces the previous one. It added a new diagram kind "DiagramWithOrderedTreeLayoutWithBigSquare". This diagram makes it possible to see that problem 1 does not exist if all children are bigger than their parent.