disable line numbers and folding for editing mode (EDU-673, EDU-674)
[idea/community.git] / python / educational-core / student / src / com / jetbrains / edu / learning / ui / StudyToolWindow.java
index c206f6679bb2d7faffed5038727e9caf3bb0d32f..d6536a790e1b82c55658a11a639825c57560a0fb 100644 (file)
@@ -21,6 +21,8 @@ import com.intellij.openapi.actionSystem.*;
 import com.intellij.openapi.diagnostic.Logger;
 import com.intellij.openapi.editor.Document;
 import com.intellij.openapi.editor.EditorFactory;
+import com.intellij.openapi.editor.EditorSettings;
+import com.intellij.openapi.editor.colors.EditorColorsManager;
 import com.intellij.openapi.editor.ex.EditorEx;
 import com.intellij.openapi.extensions.Extensions;
 import com.intellij.openapi.fileEditor.FileDocumentManager;
@@ -40,6 +42,7 @@ import com.jetbrains.edu.learning.stepic.StepicAdaptiveReactionsPanel;
 import org.jetbrains.annotations.NotNull;
 
 import javax.swing.*;
+import javax.swing.border.EmptyBorder;
 import java.awt.*;
 import java.util.List;
 import java.util.Map;
@@ -250,6 +253,12 @@ public abstract class StudyToolWindow extends SimpleToolWindowPanel implements D
       }
     });
     JComponent editorComponent = createdEditor.getComponent();
+    editorComponent.setBorder(new EmptyBorder(10, 20, 0, 10));
+    editorComponent.setBackground(EditorColorsManager.getInstance().getGlobalScheme().getDefaultBackground());
+    EditorSettings editorSettings = createdEditor.getSettings();
+    editorSettings.setLineMarkerAreaShown(false);
+    editorSettings.setLineNumbersShown(false);
+    editorSettings.setFoldingOutlineShown(false);
     mySplitPane.setFirstComponent(editorComponent);
     mySplitPane.repaint();