Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Runtime Construction of Topic Strings
Runtime Construction of Topic Strings [message #894378] Sun, 08 July 2012 19:27 Go to next message
Joseph Carroll is currently offline Joseph Carroll
Messages: 174
Registered: May 2012
Location: Milwaukee, WI
Senior Member

I was reading through some of the IEventBroker documentation and read that some of the issues/limitations on using DI to subscribe to events was going to be addressed in M5.
http://wiki.eclipse.org/Eclipse4/RCP/Event_Model#Subscribing_Using_IEventBroker

Is the listed documentation still accurate? Specifically, is dependency injection restricted if the topic string being registering is constructed at runtime?

Thanks,

JD

[Updated on: Sun, 08 July 2012 19:28]

Report message to a moderator

Re: Runtime Construction of Topic Strings [message #894496 is a reply to message #894378] Mon, 09 July 2012 08:41 Go to previous messageGo to next message
Sopot Cela is currently offline Sopot Cela
Messages: 597
Registered: December 2010
Senior Member

I don't think that is possible because the @UIEventTopic requires the "value" argument to be a constant expression. If you don't know the topic at compile time I don't think you can subscribe.
Re: Runtime Construction of Topic Strings [message #894531 is a reply to message #894496] Mon, 09 July 2012 10:17 Go to previous message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

You're right, that was changed in 4.2. The topic strings were auto-generated from the model instead of the more flexible "construction at runtime" partly because they were always used the same way and partly to help cases like @UIEventTopic

PW


Previous Topic:Some menu items are not displayed in E4 application
Next Topic:Perspective / part not changeable
Goto Forum:
  


Current Time: Fri Aug 29 22:21:04 EDT 2014

Powered by FUDForum. Page generated in 0.02161 seconds