use of com.jetbrains.python.console.PythonDebugLanguageConsoleView in project intellij-community by JetBrains.
the class PyDebugProcess method showConsole.
@Override
public void showConsole(PyThreadInfo thread) {
myConsoleContextFrame = new PyExecutionStack(this, thread).getTopFrame();
if (myExecutionConsole instanceof PythonDebugLanguageConsoleView) {
PythonDebugLanguageConsoleView consoleView = (PythonDebugLanguageConsoleView) myExecutionConsole;
UIUtil.invokeLaterIfNeeded(() -> {
consoleView.enableConsole(false);
consoleView.getPydevConsoleView().setConsoleEnabled(true);
});
}
}
use of com.jetbrains.python.console.PythonDebugLanguageConsoleView in project intellij-community by JetBrains.
the class PyEduDebugProcess method createTabLayouter.
@NotNull
@Override
public XDebugTabLayouter createTabLayouter() {
return new XDebugTabLayouter() {
@NotNull
@Override
public Content registerConsoleContent(@NotNull RunnerLayoutUi ui, @NotNull ExecutionConsole console) {
final PythonDebugLanguageConsoleView view = ((PythonDebugLanguageConsoleView) console);
view.initialized();
view.enableConsole(false);
Content eduConsole = ui.createContent("EduConsole", view.getComponent(), XDebuggerBundle.message("debugger.session.tab.console.content.name"), AllIcons.Debugger.ToolConsole, view.getPreferredFocusableComponent());
eduConsole.setCloseable(false);
ui.addContent(eduConsole, 0, PlaceInGrid.right, false);
return eduConsole;
}
};
}
use of com.jetbrains.python.console.PythonDebugLanguageConsoleView in project intellij-community by JetBrains.
the class PyEduDebugRunner method initSession.
@Override
protected void initSession(XDebugSession session, RunProfileState state, Executor executor) {
XDebugSessionTab tab = ((XDebugSessionImpl) session).getSessionTab();
if (tab != null) {
RunnerLayoutUi ui = tab.getUi();
ContentManager contentManager = ui.getContentManager();
Content content = findContent(contentManager, XDebuggerBundle.message("debugger.session.tab.console.content.name"));
if (content != null) {
ExecutionConsole console = session.getDebugProcess().createConsole();
PythonDebugLanguageConsoleView view = (PythonDebugLanguageConsoleView) console;
Presentation presentation = view.getSwitchConsoleActionPresentation();
ToggleAction action = new ToggleAction(presentation.getText(), presentation.getDescription(), presentation.getIcon()) {
@Override
public boolean isSelected(AnActionEvent e) {
return !view.isPrimaryConsoleEnabled();
}
@Override
public void setSelected(AnActionEvent e, boolean state) {
view.enableConsole(!state);
}
};
content.setActions(new DefaultActionGroup(action), ActionPlaces.DEBUGGER_TOOLBAR, view.getPreferredFocusableComponent());
}
patchLeftToolbar(session, ui);
}
}
use of com.jetbrains.python.console.PythonDebugLanguageConsoleView in project intellij-community by JetBrains.
the class PythonTestCommandLineStateBase method createAndAttachConsole.
@Override
@NotNull
protected ConsoleView createAndAttachConsole(Project project, ProcessHandler processHandler, Executor executor) throws ExecutionException {
final PythonTRunnerConsoleProperties consoleProperties = createConsoleProperties(executor);
if (isDebug()) {
final ConsoleView testsOutputConsoleView = SMTestRunnerConnectionUtil.createConsole(PythonTRunnerConsoleProperties.FRAMEWORK_NAME, consoleProperties);
final ConsoleView consoleView = new PythonDebugLanguageConsoleView(project, PythonSdkType.findSdkByPath(myConfiguration.getInterpreterPath()), testsOutputConsoleView);
consoleView.attachToProcess(processHandler);
addTracebackFilter(project, consoleView, processHandler);
return consoleView;
}
final ConsoleView consoleView = SMTestRunnerConnectionUtil.createAndAttachConsole(PythonTRunnerConsoleProperties.FRAMEWORK_NAME, processHandler, consoleProperties);
addTracebackFilter(project, consoleView, processHandler);
return consoleView;
}
use of com.jetbrains.python.console.PythonDebugLanguageConsoleView in project intellij-community by JetBrains.
the class PyDebugRunner method createConsoleCommunicationAndSetupActions.
public static void createConsoleCommunicationAndSetupActions(@NotNull final Project project, @NotNull final ExecutionResult result, @NotNull PyDebugProcess debugProcess, @NotNull XDebugSession session) {
ExecutionConsole console = result.getExecutionConsole();
if (console instanceof PythonDebugLanguageConsoleView) {
ProcessHandler processHandler = result.getProcessHandler();
initDebugConsoleView(project, debugProcess, (PythonDebugLanguageConsoleView) console, processHandler, session);
}
}
Aggregations