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

Bug 480875

Summary: Ensure focus, hover, and selection are consistently handled during creation and deletion.
Product: [Tools] GEF Reporter: Alexander Nyßen <nyssen>
Component: GEF MVCAssignee: Matthias Wienand <matthias.wienand>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: matthias.wienand
Version: 0.2.0   
Target Milestone: 4.0.0 / 3.11.0 (Neon) M3   
Hardware: All   
OS: All   
Whiteboard:

Description Alexander Nyßen CLA 2015-10-28 10:09:36 EDT
Up to now, there is a generic ClearHoverFocusSelectionOperation within MVC, but it is only used in Zest and the MVC logo example. In the MVC logo example, an FXDeletionPolicy wraps it into the deletion process. IMHO, this should not be necessary. The default deletion and creation policies should handle the side effects to selection, hover, and focus models. The ClearHoverFocusSelectionOperation should be removed (instead this should be performed based on the individual set operations for selection, hover, and focus). Also CreationPolicy should select and focus the newly created part.
Comment 1 Matthias Wienand CLA 2015-10-29 11:57:01 EDT
I removed the ClearHoverFocusSelectionOperation. The DeletionPolicy does now remove the to be deleted part from the selection and focus models. Similarly, the CreationPolicy does now add the newly created part to the selection and focus models.

Moreover, the CreationPolicy creates an IContentPart for the newly created element before executing the creation on the operation history. Therefore, you can use the new part before it was even created, for example, for live feedback.

The code is published on the master branch, therefore, I resolve this ticket as fixed for 3.11.0M3.