Bug 444412 - Update EventBroker usage in PartRenderingEngine
Summary: Update EventBroker usage in PartRenderingEngine
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.5   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.5 M6   Edit
Assignee: Philip Wenig CLA
QA Contact:
URL:
Whiteboard:
Keywords: greatfix
Depends on:
Blocks: 462056
  Show dependency tree
 
Reported: 2014-09-17 18:50 EDT by Lars Vogel CLA
Modified: 2015-06-10 17:32 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2014-09-17 18:50:52 EDT
Similar to Bug 442285 and Bug 441120 but for PartRenderingEngine.
Comment 1 Philip Wenig CLA 2015-02-07 03:05:18 EST
I'll try to fix this.
Comment 2 Philip Wenig CLA 2015-02-09 07:01:02 EST
https://git.eclipse.org/r/41415
Comment 3 Eclipse Genie CLA 2015-02-09 08:42:38 EST
New Gerrit change created: https://git.eclipse.org/r/41415
Comment 5 Lars Vogel CLA 2015-03-09 14:05:43 EDT
Thanks Philip.
Comment 6 Lars Vogel CLA 2015-03-13 09:53:47 EDT
This did introduce a Bug in CSS switching See Bug 462056.
Comment 7 Patrick Tasse CLA 2015-06-10 17:32:52 EDT
Before this change, the EventBroker would wrap the EventHandler in a UIEventHandler, which would make sure the event is handled in a Runnable on the UI thread.

After this change, the dependency injection callback is wrapped in a DIEventHandler, which executes in whatever thread triggered the event.

In our project we had a few instances where IWorkbenchPage.closeEditor() was (incorrectly) called from a WorkbenchModifyOperation (non-UI thread), and it used to work anyways because the bug was hidden by the use of the UIEventHandler.

Now in 4.5 it triggers a SWTException (Invalid thread access), and we only noticed this today and fixed our code just in time for Mars release.

So I would just like to make sure that the platform is intentionally no longer meant to safeguard against this invalid thread access like the EventBroker used to do when subscribing events?