}
}
@Override
public IBackendShell getShell(final String id) {
final IBackendShell shell = shellManager.openShell(id);
final IStreamsProxy proxy = getStreamsProxy();
if (proxy != null) {
final IStreamMonitor errorStreamMonitor = proxy.getErrorStreamMonitor();
errorStreamMonitor.addListener(new IStreamListener() {
@Override
public void streamAppended(final String text, final IStreamMonitor monitor) {
shell.add(text, IoRequestKind.STDERR);
}
});
final IStreamMonitor outputStreamMonitor = proxy.getOutputStreamMonitor();
outputStreamMonitor.addListener(new IStreamListener() {
@Override
public void streamAppended(final String text, final IStreamMonitor monitor) {
shell.add(text, IoRequestKind.STDOUT);
}
});
}
return shell;
}