Search in sources :

Example 1 with LanguageConsoleBuilder

use of com.intellij.execution.console.LanguageConsoleBuilder in project intellij-community by JetBrains.

the class PyDebugRunner method initDebugConsoleView.

public static PythonDebugConsoleCommunication initDebugConsoleView(Project project, PyDebugProcess debugProcess, PythonDebugLanguageConsoleView console, ProcessHandler processHandler, final XDebugSession session) {
    PythonConsoleView pythonConsoleView = console.getPydevConsoleView();
    PythonDebugConsoleCommunication debugConsoleCommunication = new PythonDebugConsoleCommunication(project, debugProcess);
    pythonConsoleView.setConsoleCommunication(debugConsoleCommunication);
    PydevDebugConsoleExecuteActionHandler consoleExecuteActionHandler = new PydevDebugConsoleExecuteActionHandler(pythonConsoleView, processHandler, debugConsoleCommunication);
    pythonConsoleView.setExecutionHandler(consoleExecuteActionHandler);
    debugProcess.getSession().addSessionListener(consoleExecuteActionHandler);
    new LanguageConsoleBuilder(pythonConsoleView).processHandler(processHandler).initActions(consoleExecuteActionHandler, "py");
    debugConsoleCommunication.addCommunicationListener(new ConsoleCommunicationListener() {

        @Override
        public void commandExecuted(boolean more) {
            session.rebuildViews();
        }

        @Override
        public void inputRequested() {
        }
    });
    return debugConsoleCommunication;
}
Also used : ConsoleCommunicationListener(com.jetbrains.python.console.pydev.ConsoleCommunicationListener) PythonConsoleView(com.jetbrains.python.console.PythonConsoleView) PythonDebugConsoleCommunication(com.jetbrains.python.console.PythonDebugConsoleCommunication) LanguageConsoleBuilder(com.intellij.execution.console.LanguageConsoleBuilder)

Aggregations

LanguageConsoleBuilder (com.intellij.execution.console.LanguageConsoleBuilder)1 PythonConsoleView (com.jetbrains.python.console.PythonConsoleView)1 PythonDebugConsoleCommunication (com.jetbrains.python.console.PythonDebugConsoleCommunication)1 ConsoleCommunicationListener (com.jetbrains.python.console.pydev.ConsoleCommunicationListener)1