Tools__CodeHighlightingService.st
changeset 14784 0e0fc09a7a62
parent 14487 ec94f1fcdf94
child 14928 3c11ff12d0bc
equal deleted inserted replaced
14783:e73e1d503bd1 14784:0e0fc09a7a62
   292      with highlighted syntax.
   292      with highlighted syntax.
   293      If there have been no modifications in the meantime, install it."
   293      If there have been no modifications in the meantime, install it."
   294 
   294 
   295     |firstShown lastShown cursorWasOn anyChange newLines l replaceAction list|
   295     |firstShown lastShown cursorWasOn anyChange newLines l replaceAction list|
   296 
   296 
   297     "textView" modified ifTrue:[
   297     "/ It may happen that service is unregistered while
   298         "/ new input arrived in the meantime
   298     "/ an user event for #setHighlightedCode:elements: is already in
   299 
   299     "/ an event queue but not yet processed. To handle this situation.
   300         ^ self
   300     "/ check if textView is nil (which is in case the service is unregistered)
   301     ].
   301     textView isNil ifTrue:[ ^ self ].
       
   302 
       
   303 
       
   304     modified ifTrue:[ 
       
   305         "/ a new input arrived in the meantime
       
   306         ^ self 
       
   307     ].
       
   308 
   302     done ifFalse:[
   309     done ifFalse:[
   303         "/ another coloring process has already been started.
   310         "/ another coloring process has already been started.
   304         "/ ignore this (leftover) code.
   311         "/ ignore this (leftover) code.
   305         ^ self
   312         ^ self
   306     ].
   313     ].
   376 
   383 
   377     "Modified: / 09-10-2006 / 11:50:17 / cg"
   384     "Modified: / 09-10-2006 / 11:50:17 / cg"
   378     "Created: / 14-02-2010 / 16:10:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   385     "Created: / 14-02-2010 / 16:10:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   379     "Modified (format): / 21-08-2011 / 09:38:22 / cg"
   386     "Modified (format): / 21-08-2011 / 09:38:22 / cg"
   380     "Modified: / 01-02-2012 / 19:18:00 / jv"
   387     "Modified: / 01-02-2012 / 19:18:00 / jv"
   381     "Modified: / 17-03-2012 / 19:33:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   388     "Modified: / 16-10-2014 / 12:28:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   382 ! !
   389 ! !
   383 
   390 
   384 !CodeHighlightingService class methodsFor:'documentation'!
   391 !CodeHighlightingService class methodsFor:'documentation'!
   385 
   392 
   386 version
   393 version
   387     ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeHighlightingService.st,v 1.49 2014-06-10 17:00:16 vrany Exp $'
   394     ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeHighlightingService.st,v 1.50 2014-10-16 14:26:14 vrany Exp $'
   388 !
   395 !
   389 
   396 
   390 version_CVS
   397 version_CVS
   391     ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeHighlightingService.st,v 1.49 2014-06-10 17:00:16 vrany Exp $'
   398     ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeHighlightingService.st,v 1.50 2014-10-16 14:26:14 vrany Exp $'
   392 !
   399 !
   393 
   400 
   394 version_SVN
   401 version_SVN
   395     ^ '$Id: Tools__CodeHighlightingService.st,v 1.49 2014-06-10 17:00:16 vrany Exp $'
   402     ^ '$Id: Tools__CodeHighlightingService.st,v 1.50 2014-10-16 14:26:14 vrany Exp $'
   396 ! !
   403 ! !
   397 
   404