inputThread = new InputThreadToConsole(process.getInputStream(), null); ((InputThreadToConsole)inputThread).setReturnString(returnStr);
ConsolePlugin.getDefault(); MessageConsoleStream stream = null; MessageConsole console= new MessageConsole("Kobold VCM Console",null); ConsolePlugin.getDefault().getConsoleManager().addConsoles( new IConsole[] {console}); stream = console.newMessageStream(); inputThread = new InputThreadToConsole(inputStream,stream); errorThread = new InputThreadToConsole(errStream,stream);
	public String open(String[] command, String returnStr) throws IOException,	CVSAuthenticationException{		IProgressMonitor progress = KoboldPolicy.monitorFor(null);		connected = false;		try {			process = Util.createProcess(command,progress);			inputStream = new PollingInputStream(new TimeoutInputStream(process					.getInputStream(), 8192 /* bufferSize */,					2900 /* readTimeout */, -1 /* closeTimeout */), 60, null);			outputStream = new PollingOutputStream(new TimeoutOutputStream(					process.getOutputStream(), 8192 /* buffersize */,					1000 /* writeTimeout */, 1000 /* closeTimeout */), 60,					null);			// XXX need to do something more useful with stderr			// discard the input to prevent the process from hanging due to a			// full pipe			errStream = (process.getErrorStream());			connected = true;			inputThread = new InputThreadToConsole(process.getInputStream(), null);			((InputThreadToConsole)inputThread).setReturnString(returnStr);			inputThread.run();			return ((InputThreadToConsole)inputThread).getReturnString();		} finally {			if (!connected) {				try {					close();				} finally {					// Ignore any exceptions during close				}			}		}}	