use of org.erlide.runtime.shell.IBackendShell in project erlide_eclipse by erlang.
the class BackendShellManager method dispose.
@Override
public void dispose() {
final Collection<BackendShell> c = fShells.values();
for (final IBackendShell backendShell : c) {
backendShell.close();
}
fShells.clear();
}
use of org.erlide.runtime.shell.IBackendShell in project erlide_eclipse by erlang.
the class BackendShellManager method openShell.
public synchronized IBackendShell openShell(final String id) {
BackendShell shell = getShell(id);
if (shell == null) {
OtpErlangPid server = null;
try {
server = new ErlideReshd().start(backend.getRuntime());
} catch (final Exception e) {
ErlLogger.warn(e);
}
shell = new BackendShell(backend, id, server);
shell.open();
fShells.put(id, shell);
}
return shell;
}
use of org.erlide.runtime.shell.IBackendShell in project erlide_eclipse by erlang.
the class Backend method getShell.
@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;
}
use of org.erlide.runtime.shell.IBackendShell in project erlide_eclipse by erlang.
the class BackendShellManager method closeShell.
public synchronized void closeShell(final String id) {
final IBackendShell shell = getShell(id);
if (shell != null) {
fShells.remove(id);
shell.close();
}
}
Aggregations