--- a/Tools__CodeHighlightingService.st Sun Dec 04 15:48:16 2011 +0100
+++ b/Tools__CodeHighlightingService.st Sun Dec 04 15:52:31 2011 +0100
@@ -144,20 +144,28 @@
!CodeHighlightingService methodsFor:'change & update'!
update: aspect with: param from: sender
+ |thisIsACodeChange|
+
+ thisIsACodeChange := false.
+
textView notNil ifTrue:[
"/sender == textView modifiedChannel ifTrue:[^self codeChanged: false].
- sender == textView model ifTrue:[^self codeChanged: true].
- (sender == textView and:[aspect == #sizeOfContents]) ifTrue:[^self codeChanged: true].
+ thisIsACodeChange := (sender == textView model)
+ or:[ (sender == textView and:[aspect == #sizeOfContents]) ].
].
codeView notNil ifTrue:[
- sender == codeView languageHolder ifTrue:[^self codeChanged: true].
- sender == codeView classHolder ifTrue:[^self codeChanged: true].
+ thisIsACodeChange := (sender == codeView languageHolder)
+ or:[ sender == codeView classHolder ]
+ ].
+ thisIsACodeChange ifTrue:[
+ self codeChanged: true.
+ ^ self
].
super update: aspect with: param from: sender
"Created: / 06-03-2010 / 19:38:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 13-09-2011 / 12:00:29 / cg"
"Modified: / 16-09-2011 / 17:30:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified (format): / 03-12-2011 / 10:31:37 / cg"
! !
!CodeHighlightingService methodsFor:'event handling'!
@@ -296,14 +304,20 @@
!
syntaxHighlight
-
|highlighters prio |
(highlighters := self syntaxHighlighters) isEmptyOrNil ifTrue:[
"No higlighter, nothing to do"
- ^self
+ ^ self
].
+ codeView languageHolder value isNil ifTrue:[
+ ^ self
+ ].
+"/ codeView classHolder value isNil ifTrue:[
+"/ ^ self
+"/ ].
+
"/ this clobbers the codeViews modified state; therefore, we have to remember
"/ this info somewhere ...
codeView browser ifNotNil:[
@@ -330,7 +344,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: / 26-09-2011 / 15:40:23 / cg"
+ "Modified: / 03-12-2011 / 10:34:01 / cg"
!
syntaxHighlight: delayed
@@ -435,11 +449,11 @@
!CodeHighlightingService class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeHighlightingService.st,v 1.25 2011-09-27 23:28:42 vrany Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeHighlightingService.st,v 1.26 2011-12-04 14:52:31 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeHighlightingService.st,v 1.25 2011-09-27 23:28:42 vrany Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeHighlightingService.st,v 1.26 2011-12-04 14:52:31 cg Exp $'
!
version_SVN