Tools__BackgroundSourceProcessingService.st
branchjv
changeset 12194 4639848e5517
parent 12172 047fafb1c37f
child 12262 d25ef6bb0ef3
--- a/Tools__BackgroundSourceProcessingService.st	Sat Mar 17 13:13:35 2012 +0000
+++ b/Tools__BackgroundSourceProcessingService.st	Sat Mar 17 20:05:16 2012 +0000
@@ -76,16 +76,24 @@
 
 !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 
@@ -93,7 +101,7 @@
         "/sender == textView modifiedChannel ifTrue:[^self codeChanged: false].
         sender == textView model ifTrue:[
             sender value ~= textView contents ifTrue:[
-                self sourceChanged:true.
+                self modelChanged.
                 ^self.
             ].
         ].
@@ -117,8 +125,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: / 17-03-2012 / 16:06:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !BackgroundSourceProcessingService methodsFor:'event handling'!
@@ -175,16 +183,17 @@
     ].
 
     job scheduled ifTrue:[
-        job running ifFalse:[
-            "/ process already created, but did not get a change to start yet;
-            ^ self
-        ] ifTrue:[
+"/        job running ifFalse:[
+"/            "/ process already created, but did not get a change to start yet;
+"/            ^ self
+"/        ] ifTrue:[
             job stop.
-        ]
+"/        ]
     ].
-    prio := Processor userBackgroundPriority - 1.
     textView shown ifFalse:[
-        prio := prio - 1 max:1
+        prio := Processor userBackgroundPriority - 1
+    ] ifTrue:[
+        prio := Processor activeProcess priority - 1.
     ].
 
     job startWithPriority: prio.
@@ -217,7 +226,7 @@
 !BackgroundSourceProcessingService class methodsFor:'documentation'!
 
 version
-    ^ '$Id: Tools__BackgroundSourceProcessingService.st 7913 2012-02-22 17:35:52Z vranyj1 $'
+    ^ '$Id: Tools__BackgroundSourceProcessingService.st 7940 2012-03-17 20:05:16Z vranyj1 $'
 !
 
 version_CVS
@@ -225,5 +234,5 @@
 !
 
 version_SVN
-    ^ '$Id: Tools__BackgroundSourceProcessingService.st 7913 2012-02-22 17:35:52Z vranyj1 $'
+    ^ '$Id: Tools__BackgroundSourceProcessingService.st 7940 2012-03-17 20:05:16Z vranyj1 $'
 ! !