tools/JavaSourceHighlighter.st
branchdevelopment
changeset 2738 a633a2e8e67e
parent 2735 e20dd8496371
child 2741 a9ac61c2c454
equal deleted inserted replaced
2737:83f8416e153c 2738:a633a2e8e67e
   348         ] on: Error do:[:ex|
   348         ] on: Error do:[:ex|
   349         ].  
   349         ].  
   350     ] ifFalse:[
   350     ] ifFalse:[
   351         sourceUnit := (Java classForName:'stx.libjava.tools.Source') new.
   351         sourceUnit := (Java classForName:'stx.libjava.tools.Source') new.
   352         sourceUnit setContents: source string.
   352         sourceUnit setContents: source string.
   353         parser := (Java classForName:'stx.libjava.tools.text.Highlighter') new.
   353         JavaCompiler synchronized:[
       
   354             parser := (Java classForName:'stx.libjava.tools.text.Highlighter') new.
       
   355         ].
   354         parser setMarker: marker.
   356         parser setMarker: marker.
   355         (sourceIndex notNil and:[sourceIndex isKindOf: SmallSense::ParseTreeIndex]) ifTrue:[
   357         (sourceIndex notNil and:[sourceIndex isKindOf: SmallSense::ParseTreeIndex]) ifTrue:[
   356             | indexer |
   358             | indexer |
   357 
   359 
   358             indexer := Indexer new.
   360             indexer := Indexer new.
   373     ] ifFalse:[
   375     ] ifFalse:[
   374         sourceText
   376         sourceText
   375     ]
   377     ]
   376 
   378 
   377     "Created: / 17-03-2012 / 14:02:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   379     "Created: / 17-03-2012 / 14:02:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   378     "Modified: / 17-09-2013 / 01:31:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   380     "Modified: / 19-09-2013 / 10:55:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   379 ! !
   381 ! !
   380 
   382 
   381 !JavaSourceHighlighter methodsFor:'queries'!
   383 !JavaSourceHighlighter methodsFor:'queries'!
   382 
   384 
   383 doLexicalHighlightingOnly
   385 doLexicalHighlightingOnly