Eclipse Event System [message #1690677] |
Mon, 30 March 2015 10:54  |
Eclipse User |
|
|
|
Hi,
I came across some very strange behavior of the eclipse event system.
Lets consider the following injected methods:
(the difference is the method argument String<->Object)
@Inject
@Optional
public void test1(@UIEventTopic("someEvent") String unused) {
System.out.println("hello 1");
}
@Inject
@Optional
public void test2(@UIEventTopic("someEvent") Object unused) {
System.out.println("hello 2");
}
Since I only use the event (and no object which may be sent with it), I thought that it might be a good idea to just declare the argument as java.lang.Object unused.
But: what happens now is that the method test1 works fine and the method test2 does not. It is called once during object creation but never again.
Does anybody know why this might be? Thank you!
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.09641 seconds