Examples of IStreamsProxy


Examples of org.eclipse.debug.core.model.IStreamsProxy

     */
    private class EOFHandler extends AbstractHandler {
        @Override
        public Object execute(final ExecutionEvent event)
                throws org.eclipse.core.commands.ExecutionException {
            final IStreamsProxy proxy = getProcess().getStreamsProxy();
            if (proxy instanceof IStreamsProxy2) {
                final IStreamsProxy2 proxy2 = (IStreamsProxy2) proxy;
                try {
                    proxy2.closeInputStream();
                } catch (final IOException e1) {
View Full Code Here

Examples of org.eclipse.debug.core.model.IStreamsProxy

        codeManager.unregister(context, b);
    }

    @Override
    public void streamAppended(final String text, final IStreamMonitor monitor) {
        final IStreamsProxy proxy = getStreamsProxy();
        if (monitor == proxy.getOutputStreamMonitor()) {
            // System.out.println(getName() + " OUT " + text);
        } else if (monitor == proxy.getErrorStreamMonitor()) {
            // System.out.println(getName() + " ERR " + text);
        } else {
            // System.out.println("???" + text);
        }
    }
View Full Code Here

Examples of org.eclipse.debug.core.model.IStreamsProxy

    public void assignStreamProxyListeners() {
        if (data.getLaunch() == null) {
            return;
        }
        final IStreamsProxy proxy = getStreamsProxy();
        if (proxy != null) {
            final IStreamMonitor errorStreamMonitor = proxy.getErrorStreamMonitor();
            errorStreamMonitor.addListener(this);
            final IStreamMonitor outputStreamMonitor = proxy.getOutputStreamMonitor();
            outputStreamMonitor.addListener(this);
        }
    }
View Full Code Here

Examples of org.eclipse.debug.core.model.IStreamsProxy

    }

    @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);
                }
View Full Code Here

Examples of org.eclipse.debug.core.model.IStreamsProxy

    }

    @Override
    public void input(final String s) throws IOException {
        if (isRunning()) {
            final IStreamsProxy proxy = getStreamsProxy();
            if (proxy != null) {
                proxy.write(s);
            } else {
                ErlLogger.warn(
                        "Could not send input to backend %s, stream proxy is null",
                        getName());
            }
View Full Code Here

Examples of org.eclipse.debug.core.model.IStreamsProxy

        }

    }

    protected void checkErrorMessage(IProcess process) throws CoreException {
        IStreamsProxy streamsProxy = process.getStreamsProxy();
        if (streamsProxy != null) {
            String errorMessage= streamsProxy.getErrorStreamMonitor().getContents();
            if (errorMessage.length() == 0) {
                errorMessage= streamsProxy.getOutputStreamMonitor().getContents();
            }
            if (errorMessage.length() != 0) {
                abort(errorMessage, null, IJavaLaunchConfigurationConstants.ERR_VM_LAUNCH_ERROR);
            }
        }
View Full Code Here

Examples of org.eclipse.debug.core.model.IStreamsProxy

        }

    }

    protected void checkErrorMessage(IProcess process) throws CoreException {
        IStreamsProxy streamsProxy = process.getStreamsProxy();
        if (streamsProxy != null) {
            String errorMessage= streamsProxy.getErrorStreamMonitor().getContents();
            if (errorMessage.length() == 0) {
                errorMessage= streamsProxy.getOutputStreamMonitor().getContents();
            }
            if (errorMessage.length() != 0) {
                abort(errorMessage, null, IJavaLaunchConfigurationConstants.ERR_VM_LAUNCH_ERROR);
            }
        }
View Full Code Here

Examples of org.eclipse.debug.core.model.IStreamsProxy

        }

    }

    protected void checkErrorMessage(IProcess process) throws CoreException {
        IStreamsProxy streamsProxy = process.getStreamsProxy();
        if (streamsProxy != null) {
            String errorMessage= streamsProxy.getErrorStreamMonitor().getContents();
            if (errorMessage.length() == 0) {
                errorMessage= streamsProxy.getOutputStreamMonitor().getContents();
            }
            if (errorMessage.length() != 0) {
                abort(errorMessage, null, IJavaLaunchConfigurationConstants.ERR_VM_LAUNCH_ERROR);
            }
        }
View Full Code Here

Examples of org.eclipse.debug.core.model.IStreamsProxy

        }

    }

    protected void checkErrorMessage(IProcess process) throws CoreException {
        IStreamsProxy streamsProxy = process.getStreamsProxy();
        if (streamsProxy != null) {
            String errorMessage= streamsProxy.getErrorStreamMonitor().getContents();
            if (errorMessage.length() == 0) {
                errorMessage= streamsProxy.getOutputStreamMonitor().getContents();
            }
            if (errorMessage.length() != 0) {
                abort(errorMessage, null, IJavaLaunchConfigurationConstants.ERR_VM_LAUNCH_ERROR);
            }
        }
View Full Code Here

Examples of org.eclipse.debug.core.model.IStreamsProxy

        return getProcess().isTerminated();
    }

    @Override
    public void terminate() throws DebugException {
        IStreamsProxy streamsProxy = process.getStreamsProxy();
        try {
            if (!isTerminated()) {
                streamsProxy.write(Constants.QUIT + Constants.EOL);
                // wait for subprocess exit
                p.waitFor();
            }
        } catch (IOException e) {
            LogUtil.error(e);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.