Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » IStreamListener is missing data at beginning of stream
icon5.gif  IStreamListener is missing data at beginning of stream [message #644417] Fri, 10 December 2010 21:14
Mirko Raner is currently offline Mirko Raner
Messages: 79
Registered: July 2009
Location: San Diego, CA
Member
Hi all,

we're using org.eclipse.debug.core to launch another process that needs to communicate with the workbench. Standard out of the process is used to synchronize some additional socket communication (i.e, when certain data is received from standard out, the workbench needs to establish a socket connection to the process).
To intercept data that is sent to standard out, we use an IStreamListener. The IStreamListener is added when an ILaunchesListener2.launchesAdded(...) or launchesChanged(...) is called and a newly added IProcess was detected. It seems like this is the earliest possible hook to receive notification of data being written to standard out. However, it's apparently not early enough since we're intermittently missing output that was sent right after the process started. The console view's StreamListener picks up the data (and prints it to the console), but our additional listener doesn't. It looks like our code is sometimes just a little bit too late with adding our own IStreamListener.
Are there any design patterns out there that would guarantee that a custom IStreamListener receives all output (including very early messages) from an IProcess? Is there some alternative to IStreamListener that achieves the same thing?

Thanks!
Previous Topic:snip draw2d
Next Topic:committing a multi project change set is done per project
Goto Forum:
  


Current Time: Fri Aug 01 00:02:38 EDT 2014

Powered by FUDForum. Page generated in 0.06555 seconds