Fix in SmallSenseSyntaxHighlightingService - avoid funny artefacts for incremental highlighter
authorJan Vrany <jan.vrany@fit.cvut.cz>
Thu, 08 Aug 2013 23:32:39 +0100
changeset 59 6cdb2c16ecf2
parent 58 725bcd006e34
child 60 0daf99c34c5e
Fix in SmallSenseSyntaxHighlightingService - avoid funny artefacts for incremental highlighter To avoid funny artefacts (like stray error underwaves) make sure that the very first highlighter gets a clear text with no emphasis but only when doing full highlight.
SmallSenseSyntaxHighlightingService.st
--- a/SmallSenseSyntaxHighlightingService.st	Thu Aug 08 13:35:04 2013 +0100
+++ b/SmallSenseSyntaxHighlightingService.st	Thu Aug 08 23:32:39 2013 +0100
@@ -259,7 +259,7 @@
                             "/ switch codeAspect
                             "/ case method
                                 codeAspect == SyntaxHighlighter codeAspectMethod ifTrue:[
-                                    (highlighters first respondsTo:#formatMethod:source:line:number:in:using:) ifTrue:[
+                                    (interval notNil and:[highlighters first respondsTo:#formatMethod:source:line:number:in:using:]) ifTrue:[
                                         newCodeList := oldCodeList.
                                         newCode := newCodeList asString.
                                     ] ifFalse:[
@@ -316,7 +316,7 @@
                                 ] ifFalse:[
                             "/case class definition
                                codeView codeAspect == #classDefinition ifTrue:[
-                                    (highlighters first respondsTo:#formatClassDefinition:line:number:in:) ifTrue:[
+                                    (interval notNil and:[highlighters first respondsTo:#formatClassDefinition:line:number:in:]) ifTrue:[
                                          newCodeList := oldCodeList.
                                          newCode := newCodeList asString.
                                     ] ifFalse:[
@@ -394,7 +394,7 @@
     ]
 
     "Created: / 03-08-2013 / 11:11:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 06-08-2013 / 11:43:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 08-08-2013 / 23:28:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !SmallSenseSyntaxHighlightingService class methodsFor:'documentation'!