.setAttribute(IExternalToolConstants.ATTR_WORKING_DIRECTORY, wdir);
launchConfig.setAttribute(IExternalToolConstants.ATTR_LAUNCH_IN_BACKGROUND,
true);
launchConfig.setAttribute(DebugPlugin.ATTR_CAPTURE_OUTPUT, true);
final ILaunch myLaunch = launchConfig.launch(ILaunchManager.RUN_MODE,
new NullProgressMonitor(), false, false);
final ToolResults result = new ToolResults();
if (myLaunch.getProcesses().length == 0) {
ErlLogger.error("Tool process was not created?!");
return null;
}
final IProcess process = myLaunch.getProcesses()[0];
process.getStreamsProxy().getOutputStreamMonitor()
.addListener(new IStreamListener() {
@Override
public void streamAppended(final String text,