Package com.aptana.interactive_console.console

Examples of com.aptana.interactive_console.console.InterpreterResponse


                    public void handleCommand(String userInput,
                            ICallback<Object, InterpreterResponse> onResponseReceived,
                            ICallback<Object, Tuple<String, String>> onContentsReceived) {
                        commandsHandled.add(userInput);
                        onResponseReceived.call(new InterpreterResponse("", "", false, false));
                    }
                },

                prompt, new ScriptConsoleHistory(), new ArrayList<IConsoleLineTracker>(), "",
                new PyAutoIndentStrategy());
View Full Code Here


        String stdOutContents = stdOutReader.getAndClearContents();
        String stderrContents = stdErrReader.getAndClearContents();
        //let the busy loop from execInterpreter free and enter a busy loop
        //in this function until execInterpreter gives us an input
        setNextResponse(new InterpreterResponse(stdOutContents, stderrContents, false, needInput));

        //busy loop until we have an input
        while (inputReceived == null) {
            synchronized (lock) {
                try {
View Full Code Here

                            errorContents = stdErrReader.getAndClearContents();
                        } else {
                            errorContents += "\n" + stdErrReader.getAndClearContents();
                        }
                        stdOutContents = stdOutReader.getAndClearContents();
                        setNextResponse(new InterpreterResponse(stdOutContents, errorContents, more, needInput));

                    } catch (Exception e) {
                        Log.log(e);
                        setNextResponse(new InterpreterResponse("", "Exception while pushing line to console:"
                                + e.getMessage(), false, needInput));
                    }
                    return Status.OK_STATUS;
                }
            };
View Full Code Here

        String stdOutContents = stdOutReader.getAndClearContents();
        String stderrContents = stdErrReader.getAndClearContents();
        //let the busy loop from execInterpreter free and enter a busy loop
        //in this function until execInterpreter gives us an input
        setNextResponse(new InterpreterResponse(stdOutContents, stderrContents, false, needInput));

        //busy loop until we have an input
        while (inputReceived == null) {
            synchronized (lock) {
                try {
View Full Code Here

                            errorContents = stdErrReader.getAndClearContents();
                        } else {
                            errorContents += "\n" + stdErrReader.getAndClearContents();
                        }
                        stdOutContents = stdOutReader.getAndClearContents();
                        setNextResponse(new InterpreterResponse(stdOutContents, errorContents, more, needInput));

                    } catch (Exception e) {
                        Log.log(e);
                        setNextResponse(new InterpreterResponse("", "Exception while pushing line to console:"
                                + e.getMessage(), false, needInput));
                    }
                    return Status.OK_STATUS;
                }
            };
View Full Code Here

                @Override
                protected IStatus run(IProgressMonitor monitor) {
                    PyStackFrame frame = consoleFrame.getLastSelectedFrame();
                    if (frame == null) {
                        nextResponse = new InterpreterResponse(EMPTY,
                                "[Invalid Frame]: Please select frame to connect the console." + "\n", false, false);
                        return Status.CANCEL_STATUS;
                    }
                    final EvaluateDebugConsoleExpression evaluateDebugConsoleExpression = new EvaluateDebugConsoleExpression(
                            frame);
                    evaluateDebugConsoleExpression.executeCommand(command);
                    String result = evaluateDebugConsoleExpression.waitForCommand();
                    try {
                        if (result.length() == 0) {
                            //timed out
                            nextResponse = new InterpreterResponse(result, EMPTY, false, false);
                            return Status.CANCEL_STATUS;

                        } else {
                            EvaluateDebugConsoleExpression.PydevDebugConsoleMessage consoleMessage = XMLUtils
                                    .getConsoleMessage(result);
                            nextResponse = new InterpreterResponse(consoleMessage.getOutputMessage().toString(),
                                    consoleMessage.getErrorMessage().toString(), consoleMessage.isMore(), false);
                        }
                    } catch (CoreException e) {
                        Log.log(e);
                        nextResponse = new InterpreterResponse(result, EMPTY, false, false);
                        return Status.CANCEL_STATUS;
                    }

                    return Status.OK_STATUS;
                }
View Full Code Here

TOP

Related Classes of com.aptana.interactive_console.console.InterpreterResponse

Copyright © 2018 www.massapicom. 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.