Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 481433

Summary: Semantic reordering does not trigger graphical reordering
Product: [Modeling] Sirius Reporter: Steve Monnier <steve.monnier>
Component: TreeAssignee: Pierre-Charles David <pierre-charles.david>
Status: CLOSED FIXED QA Contact: Pierre Guilet <pierre.guilet>
Severity: normal    
Priority: P3 CC: esteban.dugueperoux, pierre-charles.david
Version: 3.1.0Keywords: triaged
Target Milestone: 4.1.1   
Hardware: PC   
OS: Windows 7   
See Also: https://git.eclipse.org/r/79317
https://git.eclipse.org/r/79316
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=940c50853dc647e899406ebf122b83c323771fde
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=797d815f9237644e06caecad99feef202d2d9ec0
https://bugs.eclipse.org/bugs/show_bug.cgi?id=504494
https://git.eclipse.org/r/84331
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=cffa8e369af40097a99a581114751fb57063eac7
Whiteboard:
Bug Depends on:    
Bug Blocks: 506125, 506126    
Attachments:
Description Flags
design sample
none
test sample
none
design sample with issue none

Description Steve Monnier CLA 2015-11-04 11:48:22 EST
On a tree representation representing an Ecore model, I defined a drop tool to change the position of a selected EClass among its siblings, in a Java Service. The semantic change is processed correctly, however there is no change on the tree itself. The element are still displayed in the same order. Closing and reopening does not update the tree. Creating a new tree will display the right order.

As a workaround I had to process the same reordering among the DTreeItem.
Comment 1 Steve Monnier CLA 2015-11-04 12:02:20 EST
Created attachment 257738 [details]
design sample
Comment 2 Steve Monnier CLA 2015-11-04 12:02:40 EST
Created attachment 257739 [details]
test sample
Comment 3 Steve Monnier CLA 2015-11-04 12:07:34 EST
Created attachment 257740 [details]
design sample with issue

Scenario:
- import the "design sample with issue" in your workspace
- import the test sample in your runtime workspace
- open the tree representation
- drag c5 before c3
-> the modification is visible in the semantic model (visible in the project explorer)
-> the modification should be visible on the tree representation (it is if you try with the "design sample" that include reordering of DTreeItem)
Comment 4 Esteban DUGUEPEROUX CLA 2015-11-06 11:49:40 EST
This seems caused by condition in DTreeRefresh$TreeItemContainerChildSupport.reorderChilds()
Comment 5 Eclipse Genie CLA 2016-08-19 03:43:42 EDT
New Gerrit change created: https://git.eclipse.org/r/79317
Comment 6 Eclipse Genie CLA 2016-08-19 03:43:46 EDT
New Gerrit change created: https://git.eclipse.org/r/79316
Comment 7 Pierre-Charles David CLA 2016-09-08 08:05:39 EDT
We have candidate patches, but not enough time before 4.1.0 to fully test them and ensure they do not cause any regression. Marking as candidate for backport as from my current understanding, the code impacts would be isolated in internal classes.
Comment 10 Pierre-Charles David CLA 2016-10-21 07:48:44 EDT
Fixed, but still needs an automated test to close the ticket.
Comment 11 Pierre Guilet CLA 2016-10-21 10:38:18 EDT
Homologation is OK but still needs an automated test.
Comment 12 Pierre-Charles David CLA 2016-10-26 04:28:47 EDT
Available in Sirius 4.1.1, see https://wiki.eclipse.org/Sirius/4.1.1