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

Bug 493658

Summary: Provide a ChangeSelectionOperation that can be used instead of chaining DeselectOperation and SelectOperation.
Product: [Tools] GEF Reporter: Matthias Wienand <matthias.wienand>
Component: GEF MVCAssignee: Alexander Nyßen <nyssen>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: nyssen
Version: 0.2.0   
Target Milestone: 4.0.0 (Neon) RC2   
Hardware: All   
OS: All   
Whiteboard:

Description Matthias Wienand CLA 2016-05-13 10:27:30 EDT
When a DeselectOperation and a SelectOperation are chained, the SelectOperation will not be initialized correctly, because its initial selection does not take the deselected parts into account. Therefore, in such a situation, a selection can be lost although it should have been preserved.

Therefore, a ChangeSelectionOperation needs to be provided that can be used to deselect and select parts in one go, so that it will have the correct initial selection to determine its no-op state.
Comment 1 Alexander Nyßen CLA 2016-05-25 05:53:15 EDT
This is really annoying and IMHO we should investigate whether we can still include this into 4.0.0.
Comment 2 Alexander Nyßen CLA 2016-05-25 07:02:16 EDT
I pushed the following changes to origin/master:

- Added a ChangeSelectionOperation and ensured its used where a SelectOperation and a DeselectOperation was combined within FXFocusAndSelectOnClickPolicy and FXSelectFocusedOnTypePolicy.
- Removed the no longer used createDeselectOperation() method from FXBendConnectionPolicy.

Resolving as fixed in 4.0.0 RC2 (I will include it in an updated contribution today).