#UI_ENHANCEMENT by cg
class: Tools::CodeHighlightingService
added: #clearScrollbarBackground
changed:
#process:
#setHighlightedCode:elements:
#sourceChanged:
--- a/Tools__CodeHighlightingService.st Wed May 18 14:56:05 2016 +0200
+++ b/Tools__CodeHighlightingService.st Wed May 18 15:13:46 2016 +0200
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
"
COPYRIGHT (c) 2010 by Jan Vrany, SWING Research Group. CTU in Prague
All Rights Reserved
@@ -178,6 +176,22 @@
!CodeHighlightingService methodsFor:'private'!
+clearScrollbarBackground
+ "/ immediate change the scroller back to showing nothing;
+ "/ will get new info, when the highlighter is finished.
+
+ |scroller|
+
+ codeView notNil ifTrue:[
+ scroller := textView superView verticalScrollBar thumb.
+ scroller shown ifTrue:[
+ scroller
+ initStyle ;
+ invalidateRepairNow:true.
+ ]
+ ].
+!
+
process
"(Re)starts the processing job. Should be called whenever a source
must be (re)processed."
@@ -281,6 +295,7 @@
textView contents: newCode.
codeView syntaxElements: elements.
gutterView invalidate.
+ codeView updateScrollersViewBackground.
]
]
]
@@ -388,7 +403,8 @@
].
codeView syntaxElements: elements.
gutterView invalidate.
-
+ codeView updateScrollersViewBackground.
+
"/ Transcript showCR:'--> rehighlighted ', self identityHash printString.
"Modified: / 09-10-2006 / 11:50:17 / cg"