Bug 535076

Summary: Reconnect modify source edge creation variable.
Product: [Modeling] Sirius Reporter: Jessy Mallet <jessy.mallet>
Component: DiagramAssignee: Project Inbox <sirius.diagram-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: florian.barbin, pierre.guilet
Version: 5.1.1Keywords: triaged
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Jessy Mallet CLA 2018-05-24 12:02:16 EDT
By using "Reconnect" tool (defined in simple VSM) on diagram, the source edge creation variable is modified (particularly subVariables relation.
This behavior has been observe by calling a preCommitListener using EditinDomain.isReadOnly (Resource). 

VSM should be considered as immutable.

This is the Sirius code which modify the relation subVariables.

@Override
public void execute() throws MetaClassNotFoundException, FeatureNotFoundException {
   // We declare the OtherEndVariable as a subVariable of
   // SourceView
   tool.getSourceView().getSubVariables().add(otherEndVariable);
   variables.put(otherEndVariable, otherEndValue);
}
Comment 1 Pierre Guilet CLA 2018-06-05 07:39:02 EDT
The code is in org.eclipse.sirius.diagram.tools.internal.command.builders.ReconnectionCommandBuilder.getOtherEndVariableCreationTask(Map<AbstractVariable, Object>)