public IProcess execute(final Command command, IPipe in, IPipe out) throws CoreException { ExecutionNode node = new ExecutionNode(); node.command = (Command) EcoreUtil.copy(command); node.input = in == null ? createPipe().close(Status.OK_STATUS) : in; node.output = out == null ? createPipe() : out; node.process = new Process(this, node.input, node.output); try { commands.put(node); } catch (InterruptedException e) { throw new CoreException( new Status( Status.ERROR, EclTcpClientPlugin.PLUGIN_ID, "Failed to execute ecl command: " + command.getClass().getName(), e)); } return node.process; }