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

Bug 365592

Summary: [Workbench] UI Event subscriber should use @UIEventTopic instead of EventBroker.subscribe where possible
Product: [Eclipse Project] Platform Reporter: Dean Roberts <dean.t.roberts>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: remy.suen
Version: 4.2   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: stalebug

Description Dean Roberts CLA 2011-12-05 09:00:39 EST
Now that UI Event TOPIC constants are fully qualified strings most of our internal event subscribers should use dependency injection through the @UIEventTopic mechanism rather than EventBroker.subscribe()

I believe this is a best practice as it leads to less code that is easier to read and maintain.

As a best practice it is one we should use in our code, as many Eclipse developers look to our code as an example of how to accomplish Eclipse tasks in their own code.

A more in depth description of what is proposed can be found here:

http://wiki.eclipse.org/Eclipse4/RCP/Event_Model
Comment 1 Lars Vogel CLA 2019-11-27 07:42:45 EST
This bug hasn't had any activity in quite some time. Maybe the problem got
resolved, was a duplicate of something else, or became less pressing for some
reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it.
The information can be, for example, that the problem still occurs, that you
still want the feature, that more information is needed, or that the bug is
(for whatever reason) no longer relevant.

If the bug is still relevant, please remove the stalebug whiteboard tag.