Bug 568981 - [ELK] Consider "Port Label Placement" property
Summary: [ELK] Consider "Port Label Placement" property
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Diagram (show other bugs)
Version: 6.3.1   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2020-11-20 03:56 EST by Laurent Redor CLA
Modified: 2021-05-05 09:22 EDT (History)
1 user (show)

See Also:


Attachments
Sirius_insideOutsideSampleWithEdge.png (10.81 KB, image/png)
2020-11-20 03:57 EST, Laurent Redor CLA
no flags Details
ELK_insideOutsideSampleWithoutEdge.png (3.49 KB, image/png)
2020-11-20 03:59 EST, Laurent Redor CLA
no flags Details
ELK_insideOutsideSampleWithEdge.png (4.72 KB, image/png)
2020-11-20 04:04 EST, Laurent Redor CLA
no flags Details
TestWithInsideOutsidePortLabel.zip (5.23 KB, application/x-zip-compressed)
2020-11-20 04:05 EST, Laurent Redor CLA
no flags Details
insideOutsideSampleWithEdge.elkt (2.97 KB, application/octet-stream)
2020-11-20 04:06 EST, Laurent Redor CLA
no flags Details
insideOutsideSampleWithoutEdge.elkt (2.18 KB, application/octet-stream)
2020-11-20 04:06 EST, Laurent Redor CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent Redor CLA 2020-11-20 03:56:34 EST
IN ELK, for the label of ports, you can precise the location with "Port Label Placement" [1]. Two values are usefull: "INSIDE" or "OUTSIDE".
The result is like in ELK_insideOutsideSampleWithoutEdge.png (sometimes "NEXT_TO_PORT_IF_POSSIBLE" must be added to the previous values). With these values, the label is centered on the port, inside or outside of the node. This result is visible in ELK "Layout Graph" view with "insideOutsideSampleWithoutEdge.elkt"; or directly in ELK Demonstrators [2].

If an edge crosses the label, the label is automatically shifted to the corner, like in ELK_insideOutsideSampleWithEdge.png. This result is visible in ELK "Layout Graph" view with "insideOutsideSampleWithEdge.elkt"; or directly in ELK Demonstrators [3].

Unfortunately, the "corner location" is not a valid location in Sirius. So Sirius automatically uses an authorized location for the port label, not the same, and the result is often an overlap and/or a feeling of space too big, like in Sirius_insideOutsideSampleWithEdge.png. In the current version of Sirius, to avoid this kind of situation, the "Port Label Placement" is ignored and a fixed location is used. Code from org.eclipse.sirius.diagram.elk.ElkDiagramLayoutConnector.createPort(LayoutMapping, AbstractBorderItemEditPart, IGraphicalEditPart, ElkNode, Map<LayoutOptionTarget, Set<LayoutOption>>):
        // Set the location of port label fixed (indeed the location returned by ELK is currently not compatible with
        // Sirius constraint). The label is, by default, located centered below the port.
        elknode.setProperty(CoreOptions.PORT_LABELS_PLACEMENT, PortLabelPlacement.fixed());


This problem is linked to bug 550382 in Sirius 6.3.0. It has been reverted by bug 561385 in Sirius 6.3.1 as it has side effects.

The goals of this issue are:
* Implement fully the initial bug 550382 (by considering all aspects, a non exhaustive list is available in description of bug 561385)
* Verify that ELK "Port Label Placement" property [1], is correcty considered by Sirius: projet in "TestWithInsideOutsidePortLabel.zip" is a sample as starting point.

[1] https://www.eclipse.org/elk/reference/options/org-eclipse-elk-portLabels-placement.html
[2] https://rtsys.informatik.uni-kiel.de/elklive/elkgraph.html?compressedContent=PQKj4yunb+EgFAAIQoMIHsAOBPAJwEsBzACwBcUAKAYwEoUAmABlZQGkiBTAGxQCqAOyIA3bgQDORCnhQBDIQBMUWCmQmSAdKnS6UAFTJFJKHASwkC8gLYLlKddwW1aWGzkV4iQkihvyFBJE8rym8gTOAUrO8qLyRLzyAEa8zgCuyhKOGvpBBDamWABmOc4AorS8RDiSzgAK6alEtCgAMi3cQnXMWiwoAO7GtGQoJgrxiSlpChT6lBQ4AFzAwAPrWtxVNXVaWAQkwGkkocDcOLwAtEx9Omj6AMr1ACIAGpcdtF11lwCSMUIKERijwCEsUOV6m1rn1dIh4QjEUjwMAkFZ5DhRgBxACMSCSeCw6SoAG0UNIAF7ccEAZhYLAANMx6SgALpIIRYGIPIhUrRuboUaw+CiScEAIhJ9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joj85VEHPUMTMzxY1TGk2usyPhWggqWJygtRcfC+F2PafRHqXUQX5whIXFxOIA4DUrpw4OHjY7hw7g8LuOUjwJyErSSm9Ih7KCEgIpkOLAW5yQNPIAA
Comment 1 Laurent Redor CLA 2020-11-20 03:57:22 EST
Created attachment 284821 [details]
Sirius_insideOutsideSampleWithEdge.png
Comment 2 Laurent Redor CLA 2020-11-20 03:59:30 EST
Created attachment 284822 [details]
ELK_insideOutsideSampleWithoutEdge.png
Comment 3 Laurent Redor CLA 2020-11-20 04:04:05 EST
Created attachment 284823 [details]
ELK_insideOutsideSampleWithEdge.png
Comment 4 Laurent Redor CLA 2020-11-20 04:05:21 EST
Created attachment 284824 [details]
TestWithInsideOutsidePortLabel.zip
Comment 5 Laurent Redor CLA 2020-11-20 04:06:21 EST
Created attachment 284825 [details]
insideOutsideSampleWithEdge.elkt
Comment 6 Laurent Redor CLA 2020-11-20 04:06:41 EST
Created attachment 284826 [details]
insideOutsideSampleWithoutEdge.elkt