mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EDU-588 Add ability to turn off interactive console
This commit is contained in:
@@ -152,6 +152,22 @@ public class PyEduDebugRunner extends PyDebugRunner {
|
||||
eduConsole.setCloseable(false);
|
||||
ui.addContent(eduConsole, 0, PlaceInGrid.right, false);
|
||||
|
||||
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);
|
||||
}
|
||||
};
|
||||
|
||||
eduConsole.setActions(new DefaultActionGroup(action), ActionPlaces.DEBUGGER_TOOLBAR,
|
||||
view.getPreferredFocusableComponent());
|
||||
PyDebugProcess process = (PyDebugProcess)session.getDebugProcess();
|
||||
PyDebugRunner.initDebugConsoleView(project, process, view, processHandler, session);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user