Bug 163393 - Extensibility for DiagramEventBroker broken
Summary: Extensibility for DiagramEventBroker broken
Status: NEW
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: 1.0.1   Edit
Hardware: PC Windows XP
: P3 enhancement
Target Milestone: 2.1   Edit
Assignee: Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: plan
Depends on:
Blocks:
 
Reported: 2006-11-03 16:46 EST by Steven R. Shaw CLA
Modified: 2010-07-19 12:29 EDT (History)
3 users (show)

See Also:


Attachments
Patch for DiagramEventBroker Extensibility (26.89 KB, patch)
2007-01-25 21:50 EST, Steven R. Shaw CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Steven R. Shaw CLA 2006-11-03 16:46:05 EST
It is possible to extend the DiagramEventBroker right now, but it is broken...

DiagramEventBrokerThreadSafe is package protected.  Anyone extending DiagramEventBroker would therefore break the threading behavior.  Perhaps this functionality should be folded into DiagramEventBroker?

DiagramEventBroker#getInterestedNotificationListeners is final.  This is one of the main reasons to override DiagramEventBroker in order to broadcast an event to a set of derived semantic criteria without adding explicit listeners.
Comment 1 Steven R. Shaw CLA 2006-11-03 16:47:16 EST
I'll be happy to address this in the form of a patch...  Assign to me if desired.
Comment 2 Gleb Sturov CLA 2006-12-12 10:04:55 EST
fireNotification needs to be "protected" rather than "private" as well...
Comment 3 Steven R. Shaw CLA 2007-01-25 21:50:48 EST
Created attachment 57565 [details]
Patch for DiagramEventBroker Extensibility

This patch opens up extensibility for the DiagramEventBroker.  The DiagramEventBrokerThreadSafe has been eliminated and replaced by a ResourceSetHandler mechanism that allows internal clients to register a different handler.  This makes it possible for external clients to register a different DiagramEventBroker without eliminating the functionality of the DiagramEventBrokerThreadSafe.
Comment 4 Steven R. Shaw CLA 2007-01-26 13:27:47 EST
Note: there is also a possible race condition to do with when the overriden DiagramEventBroker gets installed.  Currently it is reliant on plug-in loading which creates an opening where the default broker will be active for a duration.  Investigation needs to be done whether the current mechanism (api to register) needs to be replaced with a Service or extension point mechanism instead.
Comment 5 Anthony Hunter CLA 2007-01-31 11:05:56 EST
Agreed that this work can be done in the 2.0 stream.
Comment 6 Mohammed Mostafa CLA 2007-01-31 13:30:30 EST
After a discussion with Steve and Gelb ; we agreed on a set of changes that need to be done to the diagram event broker

i'm going to do these changes on stages
1- allowing clients to extended the diagram event broker by removing the final key word from some methods, and making some methods protected instead of final
2- Allowing sub classes of the diagram event broker to forward events on deletd objects to listeners
3- trying to get ride of the DiagramEventBrokerThreadSafe
4- handling the some issues with the Diagram event broker factory
Comment 7 Mohammed Mostafa CLA 2007-01-31 13:30:59 EST
stage 1 and 2 are done
Comment 8 Mohammed Mostafa CLA 2007-04-17 13:14:32 EDT
stage 4 is delivered
Comment 9 Anthony Hunter CLA 2007-05-01 09:22:48 EDT
Since GMF 2.0 M6 was released April 5, 2007, doing a bulk move of all open Bugzillas currently on M6 to 2.0 M7. Owners will need to access if the issue really is targetted for 2.0 M7.
Comment 10 Anthony Hunter CLA 2007-06-01 14:12:44 EDT
I think this Bugzilla is complete?
Comment 11 Mohammed Mostafa CLA 2007-06-01 14:25:03 EDT
(In reply to comment #10)
> I think this Bugzilla is complete?

No it is not
Comment 12 Mohammed Mostafa CLA 2007-06-08 16:30:52 EDT
The only remaining piece is to get ride of the Diagram event broker thread safe
since it will require clients to copy code to get there diagram event broker working otherwise they will have threading problems
Comment 13 Anthony Hunter CLA 2007-06-14 15:20:38 EDT
Client has copied code from GMF into his application. 
Comment 14 Eclipse Webmaster CLA 2010-07-19 12:29:50 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Runtime Diagram was the original product and component for this bug