comment/format in: #initialize
changed:
#syntaxHighlight
#syntaxHighlighter
--- a/Tools__CodeHighlightingService.st Fri Sep 23 20:56:37 2011 +0200
+++ b/Tools__CodeHighlightingService.st Mon Sep 26 16:37:15 2011 +0200
@@ -78,18 +78,24 @@
!CodeHighlightingService methodsFor:'accessing'!
syntaxHighlighter
- | app lang highlighter mthd class |
+ | app lang highlighter |
"First, ask application..."
app := codeView application.
- mthd := codeView methodHolder value.
- class := codeView classHolder value.
app notNil ifTrue:[
+ | mthd class |
+
+ mthd := codeView methodHolder value.
+ class := codeView classHolder value.
(mthd notNil and:[app respondsTo: #syntaxHighlighterForMethod:]) ifTrue:[
highlighter := app syntaxHighlighterForMethod:mthd.
] ifFalse:[
(class notNil and:[app respondsTo: #syntaxHighlighterForClass:]) ifTrue:[
highlighter := app syntaxHighlighterForClass: class.
+ ] ifFalse:[
+ (class notNil and:[app respondsTo: #syntaxHighlighter]) ifTrue:[
+ highlighter := app syntaxHighlighterClass.
+ ].
].
]
].
@@ -105,8 +111,8 @@
].
^ highlighter
- "Modified: / 05-07-2011 / 11:10:11 / cg"
"Created: / 05-08-2011 / 10:48:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 26-09-2011 / 15:50:10 / cg"
!
syntaxHighlighters
@@ -184,11 +190,12 @@
initialize
job := (Smalltalk at:#BackgroundJob)
- named: 'Syntax Highlighting Job'
- on:[self syntaxHighlight: true].
+ named: 'Syntax Highlighting Job'
+ on:[self syntaxHighlight: true].
"Created: / 29-07-2011 / 10:31:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 03-08-2011 / 16:47:53 / cg"
+ "Modified (format): / 26-09-2011 / 15:39:56 / cg"
! !
!CodeHighlightingService methodsFor:'private'!
@@ -291,9 +298,7 @@
|highlighters prio |
- highlighters := self syntaxHighlighters.
-
- highlighters isEmptyOrNil ifTrue:[
+ (highlighters := self syntaxHighlighters) isEmptyOrNil ifTrue:[
"No higlighter, nothing to do"
^self
].
@@ -324,7 +329,7 @@
"Modified: / 07-07-2011 / 12:26:12 / Jan Vrany <jan.vrant@fit.cvut,cz>"
"Created: / 29-07-2011 / 11:07:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 22-08-2011 / 14:17:43 / cg"
+ "Modified: / 26-09-2011 / 15:40:23 / cg"
!
syntaxHighlight: delayed
@@ -429,11 +434,11 @@
!CodeHighlightingService class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeHighlightingService.st,v 1.23 2011-09-16 16:37:16 vrany Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeHighlightingService.st,v 1.24 2011-09-26 14:37:15 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeHighlightingService.st,v 1.23 2011-09-16 16:37:16 vrany Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeHighlightingService.st,v 1.24 2011-09-26 14:37:15 cg Exp $'
!
version_SVN