Bug 474875 - Wrong sub mappings computation for mapping imports
Summary: Wrong sub mappings computation for mapping imports
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Diagram (show other bugs)
Version: 3.0.0   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on: 465661
Blocks:
  Show dependency tree
 
Reported: 2015-08-13 05:31 EDT by Maxime Porhel CLA
Modified: 2015-08-27 09:16 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.