Community
Participate
Working Groups
The problem happens only when the treeViewer (of the MasterDetails part) is configured with a SWT.MULTI style. I notice that in order to fix that issue, we should specify the EObject to select at the TreeViewer level, instead of specifying the TreeItem to select at the tree level.
Created attachment 166468 [details] Set the selection at the TreeViewer level after a Delete is performed. The selection policy is the following (we are in the "worst" case, where the SWT.MULTI style is applied to the TreeViewer): 1. Find the next sibling element which is not part of the removed elements. 2. Find the previous sibling element which is not part of the removed elements. 3. Select the container element if it is not part of the removed elements This search mechanism is done over all the elements that are to be removed, starting with the first one.
Created attachment 166508 [details] The element to remove is not always contained through a multi-valued reference. This new patch fix an issue in the previous one when element to remove is not contained by a multi-valued feature.
Benjamin, do you have any plan to include the patch I have proposed ? If there are any part I should review/improve, please let me know.
released in HEAD with a slight rename of one of the methods.