--- a/Tools__CodeHighlightingService.st Tue Jul 02 01:07:51 2013 +0100
+++ b/Tools__CodeHighlightingService.st Tue Jul 09 22:52:27 2013 +0100
@@ -28,7 +28,7 @@
"{ NameSpace: Tools }"
BackgroundSourceProcessingService subclass:#CodeHighlightingService
- instanceVariableNames:''
+ instanceVariableNames:'syntaxPreferences'
classVariableNames:''
poolDictionaries:''
category:'Interface-CodeView'
@@ -67,8 +67,7 @@
!CodeHighlightingService class methodsFor:'accessing'!
label
-
- "Answers short label - for UI"
+ "Answers a short label - for UI"
^'Syntax Highlighting'
@@ -77,6 +76,13 @@
!CodeHighlightingService methodsFor:'accessing'!
+preferences:preferences
+ "must be able to set those - otherwise, it uses a different coloring scheme in
+ expecco"
+
+ syntaxPreferences := preferences.
+!
+
syntaxHighlighter
| app lang highlighter |
@@ -216,7 +222,7 @@
newCode := oldCode asText.
codeAspect := codeView codeAspect.
codeAspect == SyntaxHighlighter codeAspectMethod ifTrue:[
- highlighterClasses do:[:e|newCode := e formatMethod:mthd source:newCode in:cls using: nil elementsInto: elements].
+ highlighterClasses do:[:e|newCode := e formatMethod:mthd source:newCode in:cls using:syntaxPreferences elementsInto: elements].
] ifFalse:[
codeAspect == (SyntaxHighlighter codeAspectExpression) ifTrue:[
highlighterClasses do:[:e|newCode := e formatExpression:newCode in:cls elementsInto: elements].
@@ -360,11 +366,11 @@
!CodeHighlightingService class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeHighlightingService.st,v 1.39 2013-06-30 08:08:39 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeHighlightingService.st,v 1.41 2013-07-04 19:28:47 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeHighlightingService.st,v 1.39 2013-06-30 08:08:39 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeHighlightingService.st,v 1.41 2013-07-04 19:28:47 cg Exp $'
!
version_HG
@@ -373,6 +379,6 @@
!
version_SVN
- ^ '$Id: Tools__CodeHighlightingService.st,v 1.39 2013-06-30 08:08:39 cg Exp $'
+ ^ '$Id: Tools__CodeHighlightingService.st,v 1.41 2013-07-04 19:28:47 cg Exp $'
! !