Bug 474875

Summary: Wrong sub mappings computation for mapping imports
Product: [Modeling] Sirius Reporter: Maxime Porhel <maxime.porhel>
Component: DiagramAssignee: Project Inbox <sirius.diagram-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: esteban.dugueperoux, florian.barbin
Version: 3.0.0Keywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X   
Whiteboard:
Bug Depends on: 465661    
Bug Blocks:    

Description Maxime Porhel CLA 2015-08-13 05:31:54 EDT
Steps to reproduce: 
 . Take the attached reproduction case of Bug 465661
 . Open the VSM, check the mapping structure: freeFormByImport mapping reuse the ListRegions and FreeFormRegions mappings.
 . Open the new Diag with VStack diagram -> you see a compartimented container
 . Activate the FreeFormByImport layer -> you now have a container with sub containers/lists
 

  . Modify the VSM: emtpy the resued mappings of FreeFormByImport mapping and save
  . The diagram has been updated : the container is empty BUT it should not because the hide sub mappings attribut is equals to false.
Comment 1 Maxime Porhel CLA 2015-08-13 05:32:33 EDT
See org.eclipse.sirius.diagram.business.internal.componentization.mappings.DiagramMappingsManagerImpl.getContainerMappings(DNodeContainer, boolean)
Comment 2 Maxime Porhel CLA 2015-08-13 05:34:57 EDT
MultipleMappingImportTests should be updated
Comment 3 Maxime Porhel CLA 2015-08-13 10:02:05 EDT
Additional issue: 
 hstack import listByImport import FreeFromByImport import Compartment_1

Each mapping is defined in its own layer, if all layers are enabled, I get the following container mapping order (DDiagramSynchronizer l380): hStack, ListByImport, FreeFormByImport, Compartment_1 as expected.

If I enable only the Freeform and the HStack layers, I get FreeFormByImport, hStack, Compartment_1 which is not the order I expected
Comment 4 Florian Barbin CLA 2015-08-21 05:18:01 EDT
Actually,the "Hide Sub Mappings" feature is really unclear. Indeed, the current behavior is not the one expected: when the hide sub mappings is checked, the imported mapping is hidden.
For instance, a mapping A displays EClases as gray containers. The mapping B import the mapping A and displays only abstract classes as yellow containers. If the "hide sub mappings" is checked, classes which are not abstract will be hidden from diagram.