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

Bug 484690

Summary: Introduce AbstractFXTool that provides utility methods for prioritized target selection.
Product: [Tools] GEF Reporter: Matthias Wienand <matthias.wienand>
Component: GEF MVCAssignee: Matthias Wienand <matthias.wienand>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 0.2.0   
Target Milestone: 4.0.0 / 3.11.0 (Neon) M5   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 481810    

Description Matthias Wienand CLA 2015-12-18 09:15:56 EST
The user should be able to control the order in which target policies receive input events. The mechanism that is used to determine the target policies should be provided within an AbstractFXTool which can serve as the base class for all tools. Currently, the FXTypeTool only notifies the focus part or the root part about keyboard input events. The general mechanism for determining target policies should also be applied here. In this case, the focus part is the target part.
Comment 1 Matthias Wienand CLA 2015-12-18 10:28:49 EST
I created an AbstractFXTool that provides a deterministic target policy selection. The policies that are registered on the root part are executed first. The part hierarchy is then walked down to the actual target part. For every part on the way, the registered policies are sorted (alphanumerically) by their role. This allows to control the order in which policies are executed.

Moreover, I removed superfluous FXDeleteSelectedOnTypePolicy bindings and decoupled the FXCloneOnClickPolicy from the FXFocusAndSelectOnClickPolicy.

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