Tools__BackgroundSourceProcessingService.st
changeset 11558 0e93cd2b9c48
parent 11183 a0ab27f5679c
child 11618 29842c419b87
equal deleted inserted replaced
11557:2b871152c1ec 11558:0e93cd2b9c48
   131 
   131 
   132 process
   132 process
   133     "(Re)starts the processing job. Should be called whenever a source 
   133     "(Re)starts the processing job. Should be called whenever a source 
   134      must be (re)processed."
   134      must be (re)processed."
   135 
   135 
   136     | prio |
   136     | prio browser |
   137 
   137 
   138     "/ this clobbers the codeViews modified state; therefore, we have to remember
   138     "/ this clobbers the codeViews modified state; therefore, we have to remember
   139     "/ this info somewhere ...
   139     "/ this info somewhere ...
   140     codeView browser ifNotNil:[
   140     (browser := codeView browser) notNil ifTrue:[
   141         textView modified ifTrue:[
   141         textView modified ifTrue:[
   142             codeView browser navigationState realModifiedState: true
   142             browser navigationState realModifiedState: true
   143         ].
   143         ].
   144         textView modifiedChannel setValue:false.
   144         textView modifiedChannel setValue:false.
   145     ].
   145     ].
   146 
   146 
   147     job scheduled ifTrue:[
   147     job scheduled ifTrue:[
   148         job running ifFalse:[
   148         job running ifFalse:[
   149             "/ process already created, but did not get a change to start yet;
   149             "/ process already created, but did not get a change to start yet;
   150             ^ self
   150             ^ self
   151         ] ifTrue:[
   151         ].
   152             job stop.
   152         job stop.
   153         ]
       
   154     ].
   153     ].
   155     prio := Processor userBackgroundPriority - 1.
   154     prio := Processor userBackgroundPriority.
   156     textView shown ifFalse:[
       
   157         prio := prio - 1 max:1
       
   158     ].
       
   159 
       
   160     job startWithPriority: prio.
   155     job startWithPriority: prio.
   161 
   156 
   162     "Modified: / 07-07-2011 / 12:26:12 / Jan Vrany <jan.vrant@fit.cvut,cz>"
   157     "Modified: / 07-07-2011 / 12:26:12 / Jan Vrany <jan.vrant@fit.cvut,cz>"
   163     "Modified: / 26-09-2011 / 15:40:23 / cg"
       
   164     "Created: / 24-01-2012 / 12:15:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   158     "Created: / 24-01-2012 / 12:15:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
   159     "Modified: / 05-06-2012 / 23:58:20 / cg"
   165 !
   160 !
   166 
   161 
   167 process: delayed
   162 process: delayed
   168     "Do the real source processing. If delayed is true, actuall data update must
   163     "Do the real source processing. If delayed is true, actuall data update must
   169      be done within the event queue using #pushUserEvent:...
   164      be done within the event queue using #pushUserEvent:...
   185 ! !
   180 ! !
   186 
   181 
   187 !BackgroundSourceProcessingService class methodsFor:'documentation'!
   182 !BackgroundSourceProcessingService class methodsFor:'documentation'!
   188 
   183 
   189 version
   184 version
   190     ^ '$Header: /cvs/stx/stx/libtool/Tools__BackgroundSourceProcessingService.st,v 1.1 2012-01-24 12:57:30 vrany Exp $'
   185     ^ '$Header: /cvs/stx/stx/libtool/Tools__BackgroundSourceProcessingService.st,v 1.2 2012-06-05 21:59:55 cg Exp $'
   191 !
   186 !
   192 
   187 
   193 version_CVS
   188 version_CVS
   194     ^ '$Header: /cvs/stx/stx/libtool/Tools__BackgroundSourceProcessingService.st,v 1.1 2012-01-24 12:57:30 vrany Exp $'
   189     ^ '$Header: /cvs/stx/stx/libtool/Tools__BackgroundSourceProcessingService.st,v 1.2 2012-06-05 21:59:55 cg Exp $'
   195 ! !
   190 ! !