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

Bug 483716

Summary: The AbstractDomain may not open an operation on the operation history.
Product: [Tools] GEF Reporter: Matthias Wienand <matthias.wienand>
Component: GEF MVCAssignee: Alexander Nyßen <nyssen>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: nyssen
Version: 0.2.0   
Target Milestone: 4.0.0 / 3.11.0 (Neon) M5   
Hardware: All   
OS: All   
Whiteboard:

Description Matthias Wienand CLA 2015-12-05 10:14:24 EST
When integrating multiple GEF4 applications into one Eclipse UI, the individual AbstractDomain instances use the same operation history, without synchronizing access to this operation history. Therefore, when an execution transaction is currently open within one application, and then, an execution transaction is opened within another application, an IllegalStateException is thrown, indicating that you "Cannot open an operation while one is already open".

This can be reproduced by running Eclipse with the GEF4 examples being installed and performing the following actions:
1) Open the views "GEF4 MVC Logo Example" and "GEF4 Zest Graph Example".
2) Position these views in tabs next to each other.
3) In the "GEF4 MVC Logo Example" view, press and hold the key "a".
4) While holding "a", move the mouse to the tab of the "GEF4 Zest Graph Example".
5) While holding "a", click on the tab.
Comment 1 Matthias Wienand CLA 2016-01-29 11:11:35 EST
In order to synchronize the execution of operations from multiple domains, no execution transaction operation may be opened by any of the domains. Instead, the domains need to manage their execution transaction operation locally and execute it on the operation history only when the execution transaction is finished.

Nonetheless, the tools need to notify their active policies when the window of the associated scene is inactivated (as outlined in bug #486852).
Comment 2 Alexander Nyßen CLA 2016-01-30 10:36:51 EST
Pushed the following changes to origin/master: 

- Removed the usage of the operation history's operation support, which is deprecated and requires exclusive access to the operation history.
- Changed signature of execute(Operation) to throw an ExecutionTransaction.

Resolving this as fixed in 3.11.0 M5.