use of org.python.pydev.shared_interactive_console.console.ui.ScriptConsoleManager in project Pydev by fabioz.
the class PydevConsoleFactory method createDebugConsole.
/**
* Create a new Debug Console
*
* @param interpreter
* @param additionalInitialComands
* @return
*/
private PydevDebugConsole createDebugConsole(ILaunch launch, PyStackFrame frame, String additionalInitialComands, boolean addToManager, boolean bufferedOutput, IPyStackFrameProvider consoleFrameProvider) throws Exception {
PydevConsoleLaunchInfo launchAndProcess = new PydevConsoleLaunchInfo(null, null, 0, null, frame, null, null, launch != null ? PydevIProcessFactory.getEncodingFromLaunch(launch) : PydevIProcessFactory.getEncodingFromFrame(frame));
PydevConsoleInterpreter interpreter = createPydevDebugInterpreter(launchAndProcess, bufferedOutput, consoleFrameProvider);
PydevDebugConsole console = new PydevDebugConsole(interpreter, additionalInitialComands);
if (addToManager) {
ScriptConsoleManager manager = ScriptConsoleManager.getInstance();
manager.add(console, true);
}
return console;
}
use of org.python.pydev.shared_interactive_console.console.ui.ScriptConsoleManager in project Pydev by fabioz.
the class PydevConsoleFactory method connectDebugger.
private void connectDebugger(final PydevConsoleInterpreter interpreter, final String additionalInitialComands, IProgressMonitor monitor) throws IOException, CoreException, DebugException, UserCanceledException {
monitor.beginTask("Connect Debugger", 10);
try {
if (interpreter.getFrame() == null) {
monitor.worked(1);
PydevConsole console = new PydevConsole(interpreter, additionalInitialComands);
monitor.worked(1);
createDebugTarget(interpreter, console, new SubProgressMonitor(monitor, 8));
ScriptConsoleManager manager = ScriptConsoleManager.getInstance();
manager.add(console, true);
}
} finally {
monitor.done();
}
}
Aggregations