Locator is null when using the APIs to start up TCF [message #32412] |
Wed, 25 February 2009 03:09  |
Eclipse User |
|
|
|
Originally posted by: henrik.wallinder.ericsson.com
Hi,
I've successfully built the agent so I can run it on Windows. I've tried
running the tests via the debug launch and browsing a remote computer
via RSE and it works very well.
Anyway, I want to be able to run TCF standalone without Eclipse
dependencies, so as a first step I'm trying to add a listener to the
Locator:
ILocator.addListener(LocatorListener listener)
This way I should be able to be notified when the agent starts. The
problem is that when I'm trying to get the Locator it is null.
This is what I've done when setting up TCF:
1) Implemented a logger using ILogger
2) Implemented a event queue using IEventQueue. As a start I've more or
less used the same implementation as the one found in
org.eclipse.tm.internal.tcf.debug.tests.Main
3) Set the logger using Protocol.setLogger
4) Set the event queue using rotocol.setEventQueue
5) Get the Locator using Protocol.getLocator()
However, when performing the last step the Locator is null, so I can't
add a listener to it.
Do you have any ideas what I'm doing wrong here? Maybe I'm missing
something? Any help would be appreciated!
/Regards
|
|
|
Re: Locator is null when using the APIs to start up TCF [message #32482 is a reply to message #32412] |
Mon, 02 March 2009 03:57  |
Eclipse User |
|
|
|
Originally posted by: henrik.wallinder.ericsson.com
Henrik Wallinder wrote:
> Hi,
>
> I've successfully built the agent so I can run it on Windows. I've tried
> running the tests via the debug launch and browsing a remote computer
> via RSE and it works very well.
>
> Anyway, I want to be able to run TCF standalone without Eclipse
> dependencies, so as a first step I'm trying to add a listener to the
> Locator:
>
> ILocator.addListener(LocatorListener listener)
>
> This way I should be able to be notified when the agent starts. The
> problem is that when I'm trying to get the Locator it is null.
>
> This is what I've done when setting up TCF:
>
> 1) Implemented a logger using ILogger
> 2) Implemented a event queue using IEventQueue. As a start I've more or
> less used the same implementation as the one found in
> org.eclipse.tm.internal.tcf.debug.tests.Main
> 3) Set the logger using Protocol.setLogger
> 4) Set the event queue using rotocol.setEventQueue
> 5) Get the Locator using Protocol.getLocator()
>
> However, when performing the last step the Locator is null, so I can't
> add a listener to it.
>
> Do you have any ideas what I'm doing wrong here? Maybe I'm missing
> something? Any help would be appreciated!
>
> /Regards
I solved it!
I just had to create a Runnable (which gets the Locator) and the use the
IEventQueue.invokeLater(Runnable) method to run it.
/Henrik
|
|
|
Re: Locator is null when using the APIs to start up TCF [message #579354 is a reply to message #32412] |
Mon, 02 March 2009 03:57  |
Eclipse User |
|
|
|
Originally posted by: henrik.wallinder.ericsson.com
Henrik Wallinder wrote:
> Hi,
>
> I've successfully built the agent so I can run it on Windows. I've tried
> running the tests via the debug launch and browsing a remote computer
> via RSE and it works very well.
>
> Anyway, I want to be able to run TCF standalone without Eclipse
> dependencies, so as a first step I'm trying to add a listener to the
> Locator:
>
> ILocator.addListener(LocatorListener listener)
>
> This way I should be able to be notified when the agent starts. The
> problem is that when I'm trying to get the Locator it is null.
>
> This is what I've done when setting up TCF:
>
> 1) Implemented a logger using ILogger
> 2) Implemented a event queue using IEventQueue. As a start I've more or
> less used the same implementation as the one found in
> org.eclipse.tm.internal.tcf.debug.tests.Main
> 3) Set the logger using Protocol.setLogger
> 4) Set the event queue using rotocol.setEventQueue
> 5) Get the Locator using Protocol.getLocator()
>
> However, when performing the last step the Locator is null, so I can't
> add a listener to it.
>
> Do you have any ideas what I'm doing wrong here? Maybe I'm missing
> something? Any help would be appreciated!
>
> /Regards
I solved it!
I just had to create a Runnable (which gets the Locator) and the use the
IEventQueue.invokeLater(Runnable) method to run it.
/Henrik
|
|
|
Powered by
FUDForum. Page generated in 0.03628 seconds