tools/JavaSyntaxHighlighter.st
changeset 3789 957010ea4ec1
parent 3508 622620308fee
--- a/tools/JavaSyntaxHighlighter.st	Thu Oct 26 22:38:06 2017 +0100
+++ b/tools/JavaSyntaxHighlighter.st	Tue Dec 05 22:04:46 2017 +0000
@@ -20,6 +20,8 @@
 "
 "{ Package: 'stx:libjava/tools' }"
 
+"{ NameSpace: Smalltalk }"
+
 JavaAbstractSourceHighlighter subclass:#JavaSyntaxHighlighter
 	instanceVariableNames:''
 	classVariableNames:''
@@ -109,7 +111,11 @@
      often same same source is to be highlighted"
 
     preferences isNil ifTrue:[
-        preferences := UserPreferences current.
+        "/ The `...codeViewThene ? UserPreferences current` trick below is 
+        "/ there to make this code working with both old and editor-thene-aware 
+        "/ code. Will wanish as soon as editor thene support will be
+        "/ integrated.
+        preferences := UserPreferences current codeViewTheme ? UserPreferences current.
     ].
     (JavaVM booted not or: [self doLexicalHighlightingOnly]) ifTrue:[
         ^ self format: source string.
@@ -177,7 +183,7 @@
     ]
 
     "Created: / 04-08-2011 / 23:44:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 12-12-2014 / 03:04:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 05-12-2017 / 21:19:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 formatClassDefinition: code line: line number: lineNr in: cls
@@ -189,7 +195,11 @@
 formatMethod:mth source:source in:class using: prefs
     preferences := prefs.
     preferences isNil ifTrue:[
-        preferences := UserPreferences current.
+        "/ The `...codeViewThene ? UserPreferences current` trick below is 
+        "/ there to make this code working with both old and editor-thene-aware 
+        "/ code. Will wanish as soon as editor thene support will be
+        "/ integrated.
+        preferences := UserPreferences current codeViewTheme ? UserPreferences current.
     ].
 
     JavaMethod showFullSource ifTrue:[
@@ -229,7 +239,7 @@
     ^ sourceText
 
     "Created: / 04-08-2011 / 23:45:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified (format): / 26-11-2013 / 23:04:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 05-12-2017 / 21:19:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 formatMethod:mthd source:newCode line: line number: lnr in:cls using:syntaxPreferences
@@ -291,7 +301,6 @@
     "Modified: / 17-09-2013 / 01:33:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
-
 !JavaSyntaxHighlighter::Indexer methodsFor:'accessing'!
 
 index
@@ -468,7 +477,6 @@
     "Modified: / 11-09-2013 / 01:45:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
-
 !JavaSyntaxHighlighter::Marker methodsFor:'accessing'!
 
 highlighter:aJavaSourceHighlighter