Bug 582174 - Can't select the container border with border node creation tool
Summary: Can't select the container border with border node creation tool
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Diagram (show other bugs)
Version: 7.1.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-04 06:03 EDT by Florian Barbin CLA
Modified: 2023-07-31 05:45 EDT (History)
1 user (show)

See Also:


Attachments
Use case (9.83 KB, application/zip)
2023-07-04 06:03 EDT, Florian Barbin CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Barbin CLA 2023-07-04 06:03:20 EDT
Created attachment 289130 [details]
Use case

If a container can have border nodes but if this container is also a vertical stack container (with at least one compartment), it is impossible to select the border to create the border node.
It is possible only if the container is contained in another container.

The workaround consists in adding the compartment in the tool creation extra mappings but in this case, the border node is not created at the clicked location (see bug 582156).

Steps to reproduce:

 * Import the given use case
 * Open the diagram and try to create an EClass (represented by a border node) on EPackage2: The only place authorized is the border between the title and the inner compartment.
 * Try to create an EClass on the EPackage1 inside EPackage1: the border is selectable and the border node is created at the selected location.
Comment 1 Florian Barbin CLA 2023-07-04 11:16:40 EDT
The difference is in the DNodeContainerEditPart (represents a container as a direct child of the diagram). In org.eclipse.sirius.diagram.ui.internal.edit.parts.DNodeContainerEditPart.createDefaultEditPolicies(), we install the ContainerCreationEditPolicy. This policy is not installed in the DNodeContainer2EditPart (represents a container as a child of another container)
Comment 2 Florian Barbin CLA 2023-07-04 11:22:49 EDT
It is not really clear to me why this edit policy is installed on the DNodeContainerEditPart and not the DNodeContainer2EditPart.