Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » @UIEventTopic parameter?
@UIEventTopic parameter? [message #696667] Thu, 14 July 2011 14:31 Go to next message
Cristiano Gaviao is currently offline Cristiano GaviaoFriend
Messages: 253
Registered: July 2009
Senior Member
Hi

I'm trying to understand how could I use the annotation

I could subscribe to some event using this approach:
		eventBroker.subscribe(UIEvents.buildTopic(UIEvents.UIElement.TOPIC,
				UIEvents.UIElement.WIDGET), ev5);

and that is working properly and I always receive a Event object in 'ev5' handler.

Now I'm trying to do the same using UIEventTopic annotation. I've used this:
@Inject
	void processWindowEvents(
			@Optional @UIEventTopic(UIEvents.UIElement.TOPIC) Object event) {
		System.out.println(event);

	}


Its not seem to be working. It is being called once, but I think by the DI and the event parameter is always null.

I'm doing the right thing?

thanks

Cristiano
Re: @UIEventTopic parameter? [message #698432 is a reply to message #696667] Tue, 19 July 2011 13:12 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Look at UIEvents.buildTopic(*) You need to use a string that's equivalent to what buildTopic(*) returns in your @UIEventTopic(string_topic).


PW


Previous Topic:Use of 3.x plugins in e4
Next Topic:Please help me evaluate e4 for my application
Goto Forum:
  


Current Time: Tue Nov 25 02:05:56 GMT 2014

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

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