views:

94

answers:

1

Hi!

I develop an eclipse plugin and I use process running within this. I create an process and after I read its inputsream, but while the process and the inputstream are running, my eclipse platform can't answer for anything. So I would like to do a solution, when eclipse doesn't freeze. I think I should do this with java threads. If sombody has an idea, describe that please. Thanks!

A: 

You can spawn a separate thread to read the input stream.

To see an example of this, in Eclipse, do File -> Import -> Plug-in Development -> Plug-ins and Fragments. Import from the active platform, and import projects with source folders. On the next tab, choose "org.eclipse.equinox.p2.jarprocessor".

Take a look at org.eclipse.equinox.internal.p2.jarprocessor.StreamProcessor. It runs in two modes, one using Jobs, the other using normal threads. See the StreamProcessor getting used in CommandStep#execute

Andrew Niefer