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

Bug 486833

Summary: Ensure tools only register their listeners once per scene.
Product: [Tools] GEF Reporter: Matthias Wienand <matthias.wienand>
Component: GEF MVCAssignee: gef-inbox <gef-inbox>
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:

Description Matthias Wienand CLA 2016-01-29 10:05:47 EST
The tool implementations provided within MVC.FX register their listeners once per viewer. However, if two viewers are sharing the same scene, the listeners will be registered twice for that scene, and therefore, would get notified twice upon events, too.
Comment 1 Matthias Wienand CLA 2016-02-01 05:39:11 EST
I added methods for handling the loss of viewer focus to the interaction policy interfaces, implemented the new methods in the interaction policies by rolling back the transactional policies that have been initialized, and implemented notifying the policies about losing viewer focus in the tools. The code is published on the master branch, therefore, I resolve this ticket as fixed for 3.11.0M5.
Comment 2 Matthias Wienand CLA 2016-02-01 05:40:09 EST
Sorry, I commented on the wrong ticket, reverting recent changes.
Comment 3 Matthias Wienand CLA 2016-02-01 07:41:06 EST
I ensured that all tool implementations are only registering their listeners once per scene. Therefore, the target policy resolver had to be adjusted to find the viewer for a given visual. I accomplished this by introducing a new method IViewer#isViewerVisual(Node):boolean. The code is published on the master branch, therefore, I resolve this ticket as fixed for 3.11.0M5.