for (int i = 0; i < existing.length; i++)
if (name.equals(existing[i].getName()))
return (MessageConsole) existing[i];
//no console found, so create a new one
MessageConsole myConsole = new MessageConsole(name, null);
conMan.addConsoles(new IConsole[]{myConsole});
return myConsole;
}
The first problem (which is probably obvious) is that I am not scheduling
a job, so the processes cause the workspace to hang till its done. The
second problem is that the output doesn't show up in the MessgeConsole not
just till one process is done, but until BOTH processes are done. Once
both processes are done, this huge chunk of text from both their output
streams is pasted in the MessageConsole. It would be preferable that the
output is pasted in the MessageConsole as it is recieved from the external
process.
I guess my questions are as follows:
1. Is there a separate class that comes with the eclipse api that I can
use in place of the java ProcessBuilder?
2. Once I use a Job to schedule the processes will the output get to the
MessageConsole incrementally? Or will it still just come out in one huge
chunk with the way I have done it?
Help will be much appreciated, and please include cod snippets if you can
:)