Preferences: continue to connect SciNotes
[scilab.git] / scilab / modules / scinotes / src / java / org / scilab / modules / scinotes / ScilabEditorPane.java
index 793ad30..b142486 100644 (file)
@@ -258,10 +258,25 @@ public class ScilabEditorPane extends JEditorPane implements Highlighter.Highlig
         setTransferHandler(new CopyAsHTMLAction.HTMLTransferHandler());
     }
 
+    public void enableColorization(boolean b) {
+        View view = ((ScilabDocument) getDocument()).getView();
+        if (view != null) {
+            if (view instanceof ScilabView) {
+                ((ScilabView) view).enable(b);
+            } else {
+                ((ScilabPlainView) view).enable(b);
+            }
+        }
+    }
+
     public void configurationChanged(SciNotesConfiguration.Conf conf) {
         ((ScilabEditorKit) getEditorKit()).getStylePreferences().configurationChanged(conf);
 
         if (conf.display) {
+            enableHighlightedLine(SciNotesOptions.getSciNotesDisplay().highlightCurrentLine);
+            setHighlightedLineColor(SciNotesOptions.getSciNotesDisplay().currentLineColor);
+            enableColorization(SciNotesOptions.getSciNotesDisplay().keywordsColorization);
+
             boolean kw = SciNotesOptions.getSciNotesDisplay().highlightKeywords;
             boolean op = SciNotesOptions.getSciNotesDisplay().highlightBrackets;