--- a/Tools__BackgroundSourceProcessingService.st Wed Feb 05 20:09:04 2014 +0100
+++ b/Tools__BackgroundSourceProcessingService.st Wed Feb 05 20:09:08 2014 +0100
@@ -1,3 +1,14 @@
+"
+ COPYRIGHT (c) 2006 by eXept Software AG
+ All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+"
"{ Package: 'stx:libtool' }"
"{ NameSpace: Tools }"
@@ -11,6 +22,20 @@
!BackgroundSourceProcessingService class methodsFor:'documentation'!
+copyright
+"
+ COPYRIGHT (c) 2006 by eXept Software AG
+ All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+"
+!
+
documentation
"
An abstract base class for all services that process current
@@ -51,36 +76,56 @@
!BackgroundSourceProcessingService methodsFor:'change & update'!
+modelChanged
+ "Model has changed (i.e., value holder keeping displayed text"
+
+ self sourceChanged: true
+
+ "Created: / 17-03-2012 / 15:45:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
sourceChanged:force
"Called when codeview's text changes"
- (force or:[codeView textView modified]) ifTrue:[
+ (force or:[codeView reallyModified]) ifTrue:[
self process
].
"Modified: / 22-08-2011 / 13:51:53 / cg"
"Modified (format): / 05-09-2011 / 05:06:40 / cg"
- "Modified: / 24-01-2012 / 12:25:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 17-03-2012 / 16:04:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
update:aspect with:param from:sender
textView notNil ifTrue:[
"/sender == textView modifiedChannel ifTrue:[^self codeChanged: false].
sender == textView model ifTrue:[
- ^ self sourceChanged:true
+ sender value ~= textView contents ifTrue:[
+ self modelChanged.
+ ^self.
+ ].
].
(sender == textView and:[aspect == #sizeOfContents]) ifTrue:[
- ^ self sourceChanged:true
+ self sourceChanged:true.
+ ^self.
].
].
codeView notNil ifTrue:[
sender == codeView languageHolder ifTrue:[
- ^ self sourceChanged:true
+ self sourceChanged:true.
+ ^self
].
sender == codeView classHolder ifTrue:[
- ^ self sourceChanged:true
+ self sourceChanged:true.
+ ^self
].
].
+
+ aspect == #codeAspect ifTrue:[
+ self sourceChanged:true.
+ ^self
+ ].
+
super
update:aspect
with:param
@@ -88,7 +133,8 @@
"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: / 22-02-2012 / 15:02:16 / jv"
+ "Modified: / 15-04-2013 / 23:00:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!BackgroundSourceProcessingService methodsFor:'event handling'!
@@ -190,9 +236,10 @@
!BackgroundSourceProcessingService class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/Tools__BackgroundSourceProcessingService.st,v 1.3 2012-07-19 15:19:59 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__BackgroundSourceProcessingService.st,v 1.4 2014-02-05 19:09:08 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libtool/Tools__BackgroundSourceProcessingService.st,v 1.3 2012-07-19 15:19:59 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__BackgroundSourceProcessingService.st,v 1.4 2014-02-05 19:09:08 cg Exp $'
! !
+