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 23:27 Go to next message
Joseph Carroll is currently offline Joseph CarrollFriend
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.

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



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

Report message to a moderator

Re: Runtime Construction of Topic Strings [message #894496 is a reply to message #894378] Mon, 09 July 2012 12:41 Go to previous messageGo to next message
Sopot Cela is currently offline Sopot CelaFriend
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 14:17 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
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


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

Current Time: Sat Nov 28 07:59:40 GMT 2015

Powered by FUDForum. Page generated in 0.01605 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software