AbstractSyntaxHighlighter.st
changeset 2527 a87cf2c8edf2
parent 2526 ecd1ee8f03bc
child 2568 44f3c6ce19f1
equal deleted inserted replaced
2526:ecd1ee8f03bc 2527:a87cf2c8edf2
   174             "/ ex suspendedContext fullPrintAll.
   174             "/ ex suspendedContext fullPrintAll.
   175         ].
   175         ].
   176         ^ aString
   176         ^ aString
   177     ] do:[
   177     ] do:[
   178         highlighter := self for:(ReadStream on:aString string) in:aClass.    
   178         highlighter := self for:(ReadStream on:aString string) in:aClass.    
       
   179         highlighter method:methodOrNil.
   179         preferencesOrNil notNil ifTrue:[highlighter preferences:preferencesOrNil].
   180         preferencesOrNil notNil ifTrue:[highlighter preferences:preferencesOrNil].
   180         "/ highlighter ignoreErrors:true.
   181         "/ highlighter ignoreErrors:true.
   181         highlighter ignoreWarnings:true.
   182         highlighter ignoreWarnings:true.
   182         highlighter sourceText:(text := aString string asText).
   183         highlighter sourceText:(text := aString string asText).
   183         highlighter method:methodOrNil.
       
   184 
   184 
   185         "/ use an array here - this can be changed much faster using #at:put:
   185         "/ use an array here - this can be changed much faster using #at:put:
   186         text emphasisCollection:(Array new:aString size).
   186         text emphasisCollection:(Array new:aString size).
   187 
   187 
   188         tree := highlighter parseMethod.
   188         tree := highlighter parseMethod.
   220 '
   220 '
   221         in:UndefinedObject
   221         in:UndefinedObject
   222     "
   222     "
   223 
   223 
   224     "Created: / 28-04-2010 / 13:01:42 / cg"
   224     "Created: / 28-04-2010 / 13:01:42 / cg"
   225     "Modified: / 07-05-2010 / 12:24:52 / cg"
   225     "Modified: / 05-07-2011 / 11:22:20 / cg"
   226 !
   226 !
   227 
   227 
   228 formatMethod:aMethodOrNil source:aString in:aClass using:preferencesOrNil elementsInto: elements
   228 formatMethod:aMethodOrNil source:aString in:aClass using:preferencesOrNil elementsInto: elements
   229     ^ self formatMethod:aString in:aClass using:preferencesOrNil
   229     ^ self formatMethod:aString in:aClass using:preferencesOrNil
   230 
   230 
   432 ! !
   432 ! !
   433 
   433 
   434 !AbstractSyntaxHighlighter class methodsFor:'documentation'!
   434 !AbstractSyntaxHighlighter class methodsFor:'documentation'!
   435 
   435 
   436 version_CVS
   436 version_CVS
   437     ^ '$Header: /cvs/stx/stx/libcomp/AbstractSyntaxHighlighter.st,v 1.6 2011-07-05 09:13:09 cg Exp $'
   437     ^ '$Header: /cvs/stx/stx/libcomp/AbstractSyntaxHighlighter.st,v 1.7 2011-07-05 11:35:00 cg Exp $'
   438 !
   438 !
   439 
   439 
   440 version_SVN
   440 version_SVN
   441     ^ '§ Id §'
   441     ^ '§ Id §'
   442 ! !
   442 ! !