Community
Participate
Working Groups
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.
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)
It is not really clear to me why this edit policy is installed on the DNodeContainerEditPart and not the DNodeContainer2EditPart.