diff --git a/python/educational-core/student/src/com/jetbrains/edu/learning/checker/StudyCheckUtils.java b/python/educational-core/student/src/com/jetbrains/edu/learning/checker/StudyCheckUtils.java
index 7e62ccd1c038..940ce051c743 100644
--- a/python/educational-core/student/src/com/jetbrains/edu/learning/checker/StudyCheckUtils.java
+++ b/python/educational-core/student/src/com/jetbrains/edu/learning/checker/StudyCheckUtils.java
@@ -1,5 +1,6 @@
package com.jetbrains.edu.learning.checker;
+import com.intellij.execution.impl.ConsoleViewImpl;
import com.intellij.execution.ui.ConsoleViewContentType;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.diagnostic.Logger;
@@ -32,7 +33,6 @@ import com.jetbrains.edu.learning.courseFormat.TaskFile;
import com.jetbrains.edu.learning.editor.StudyEditor;
import com.jetbrains.edu.learning.navigation.StudyNavigator;
import com.jetbrains.edu.learning.ui.StudyTestResultsToolWindowFactory;
-import com.jetbrains.python.console.PythonConsoleView;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
@@ -206,13 +206,13 @@ public class StudyCheckUtils {
final Content[] contents = window.getContentManager().getContents();
for (Content content : contents) {
final JComponent component = content.getComponent();
- if (component instanceof PythonConsoleView) {
- ((PythonConsoleView)component).clear();
+ if (component instanceof ConsoleViewImpl) {
+ ((ConsoleViewImpl)component).clear();
if (!solved) {
- ((PythonConsoleView)component).print(message, ConsoleViewContentType.ERROR_OUTPUT);
+ ((ConsoleViewImpl)component).print(message, ConsoleViewContentType.ERROR_OUTPUT);
}
else {
- ((PythonConsoleView)component).print(message, ConsoleViewContentType.NORMAL_OUTPUT);
+ ((ConsoleViewImpl)component).print(message, ConsoleViewContentType.NORMAL_OUTPUT);
}
window.setAvailable(true, () -> {});
window.show(() -> {});
diff --git a/python/educational-core/student/src/com/jetbrains/edu/learning/ui/StudyTestResultsToolWindowFactory.kt b/python/educational-core/student/src/com/jetbrains/edu/learning/ui/StudyTestResultsToolWindowFactory.kt
index 549d4dd288a9..40be63a4cf58 100644
--- a/python/educational-core/student/src/com/jetbrains/edu/learning/ui/StudyTestResultsToolWindowFactory.kt
+++ b/python/educational-core/student/src/com/jetbrains/edu/learning/ui/StudyTestResultsToolWindowFactory.kt
@@ -1,5 +1,7 @@
package com.jetbrains.edu.learning.ui
+import com.intellij.execution.impl.ConsoleViewImpl
+import com.intellij.openapi.editor.ex.EditorEx
import com.intellij.openapi.fileEditor.FileEditorManager
import com.intellij.openapi.fileEditor.FileEditorManagerEvent
import com.intellij.openapi.fileEditor.FileEditorManagerListener
@@ -8,30 +10,24 @@ import com.intellij.openapi.vfs.VirtualFile
import com.intellij.openapi.wm.ToolWindow
import com.intellij.openapi.wm.ToolWindowFactory
import com.jetbrains.edu.learning.StudyUtils
-import com.jetbrains.python.console.PythonConsoleView
-class StudyTestResultsToolWindowFactory: ToolWindowFactory {
+class StudyTestResultsToolWindowFactory : ToolWindowFactory {
override fun createToolWindowContent(project: Project, toolWindow: ToolWindow) {
val currentTask = StudyUtils.getCurrentTask(project)
if (currentTask != null) {
- val sdk = StudyUtils.findSdk(currentTask, project)
- if (sdk != null) {
- val testResultsToolWindow = PythonConsoleView(project, "Local test results", sdk);
- testResultsToolWindow.isEditable = false
- testResultsToolWindow.isConsoleEditorEnabled = false
- testResultsToolWindow.prompt = null
- toolWindow.isToHideOnEmptyContent = true
+ val consoleView = ConsoleViewImpl(project, true);
+ toolWindow.isToHideOnEmptyContent = true
- val contentManager = toolWindow.contentManager
- val content = contentManager.factory.createContent(testResultsToolWindow.component, null, false)
- contentManager.addContent(content)
+ val contentManager = toolWindow.contentManager
+ val content = contentManager.factory.createContent(consoleView.component, null, false)
+ contentManager.addContent(content)
+ val editor = consoleView.editor
+ if (editor is EditorEx) {
+ editor.isRendererMode = true
+ }
- project.messageBus.connect().subscribe(FileEditorManagerListener.FILE_EDITOR_MANAGER, getFileEditorManagerListener(toolWindow))
- }
- else {
- StudyUtils.showNoSdkNotification(currentTask, project)
- }
+ project.messageBus.connect().subscribe(FileEditorManagerListener.FILE_EDITOR_MANAGER, getFileEditorManagerListener(toolWindow))
}
}
diff --git a/python/educational-core/student/student.iml b/python/educational-core/student/student.iml
index 5fff6115855f..830451861a0f 100644
--- a/python/educational-core/student/student.iml
+++ b/python/educational-core/student/student.iml
@@ -22,7 +22,6 @@
-