Bug 465661 - Error after children presentation change from VStack or HStack to FreeForm value
Summary: Error after children presentation change from VStack or HStack to FreeForm value
Status: CLOSED FIXED
Alias: None
Product: Sirius
Classification: Modeling
Component: Diagram (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows NT
: P1 normal (vote)
Target Milestone: 3.1.0   Edit
Assignee: Maxime Porhel CLA
QA Contact: Jessy Mallet CLA
URL:
Whiteboard:
Keywords: triaged
Depends on: 436359
Blocks: 474875 470859
  Show dependency tree
 
Reported: 2015-04-28 05:10 EDT by Belqassim Djafer CLA
Modified: 2015-10-16 09:10 EDT (History)
3 users (show)

See Also:


Attachments
Compartments use case (11.16 KB, application/octet-stream)
2015-04-28 05:10 EDT, Belqassim Djafer CLA
no flags Details
Compartments use case (11.16 KB, application/zip)
2015-08-11 09:49 EDT, Maxime Porhel CLA
no flags Details
Compartment use case (12.11 KB, application/zip)
2015-08-13 05:41 EDT, Maxime Porhel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Belqassim Djafer CLA 2015-04-28 05:10:18 EDT
Created attachment 252830 [details]
Compartments use case

We have several issues when we change a children presentation for compartments from VStack/HStack to FreeForm with opened diagram. And from FreeForm to VStack/HStack with closed diagram.

The first scenario :
1- Import attached project.
2- Open both representations "new Diag with HStack" and "new Diag with VStack".
3- Open the odesign file and set the children presentation value of the both Compartment mapping (Diag with HStack -> Default -> Compartment and Diag with VStack -> Default -> Compartment) to "FreeForm" and save the odesign file.
4- KO : in the both opened presentations, children presentations are not changed as expected.

The second scenario :
1- Import attached project.
2- Open the odesign file and set the children presentation value of the both Compartment mapping (Diag with HStack -> Default -> Compartment and Diag with VStack -> Default -> Compartment) to "FreeForm" and save the odesign file.
3- Open representations "new Diag with HStack" and "new Diag with VStack".
4- OK : children presentations are changed as expected.
5- Return to the odesign file editor and discard children presentation changes (double undo action)
6- KO : in opened presentations, children presentations are not changed as expected.
Comment 1 Maxime Porhel CLA 2015-04-28 05:20:27 EDT
The figures and policies should be update when the model change from VStack/HStack to free form and vice versa. (See existing code which handles list <-> freeform)
Comment 2 Maxime Porhel CLA 2015-04-28 09:02:31 EDT
Label styles also have to be checked.
Comment 3 Maxime Porhel CLA 2015-07-02 03:18:37 EDT
Additional scenario: 
  . Create a VSM with ContainerMappingImport in several optional layers to switch between presentation mode: HStack, VStack and FreeFrom (no layer with List because List accepts only node mapping as children and H/VStack accept only container as children).
Comment 4 Maxime Porhel CLA 2015-08-11 09:49:37 EDT
Created attachment 255786 [details]
Compartments use case
Comment 5 Eclipse Genie CLA 2015-08-11 11:03:28 EDT
New Gerrit change created: https://git.eclipse.org/r/53573
Comment 7 Maxime Porhel CLA 2015-08-13 05:41:03 EDT
Created attachment 255834 [details]
Compartment use case
Comment 8 Eclipse Genie CLA 2015-08-13 09:25:13 EDT
New Gerrit change created: https://git.eclipse.org/r/53706
Comment 9 Eclipse Genie CLA 2015-08-14 10:56:53 EDT
New Gerrit change created: https://git.eclipse.org/r/53787
Comment 10 Eclipse Genie CLA 2015-08-18 12:02:58 EDT
New Gerrit change created: https://git.eclipse.org/r/54010
Comment 11 Eclipse Genie CLA 2015-08-18 12:03:00 EDT
New Gerrit change created: https://git.eclipse.org/r/54009
Comment 14 Eclipse Genie CLA 2015-09-15 06:25:45 EDT
New Gerrit change created: https://git.eclipse.org/r/55956
Comment 16 Maxime Porhel CLA 2015-09-15 09:25:49 EDT
Corrected on master for Sirius 3.1.0

ContainerMappingImportWithChildrenPresentationChangesTests test the children presentation changes through layers with container mapping imports: changing activated layers changes the children presentation. The tests check that the expected changes occurs without throwing errors in the Sirius model, the edit parts structure, the installed edit policies, the figures and borders (FreeForm -> VStack -> List -> HStack).
Comment 17 Jessy Mallet CLA 2015-09-28 08:49:25 EDT
Validated with Sirius 3.1.0.201509241504
Comment 18 Pierre-Charles David CLA 2015-10-16 09:10:47 EDT
Available in Sirius 3.1.0.