Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DSDP - Target Management » Locator is null when using the APIs to start up TCF
Locator is null when using the APIs to start up TCF [message #32412] Wed, 25 February 2009 08:09 Go to next message
Eclipse UserFriend
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 08:57 Go to previous message
Eclipse UserFriend
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 08:57 Go to previous message
Eclipse UserFriend
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
Previous Topic:problem with list with new rse 301
Next Topic:How to use SDK to launch terminal window
Goto Forum:
  


Current Time: Fri Dec 19 10:53:50 GMT 2014

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

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