I am trying to play with the new VS2010 syntax coloring options based on the Noah Richards colorimetric difference sample. The goal is to create syntax coloring for SpecFlow ( http://www.specflow.org ).
In my case, the search for syntax elements is rather complicated, not linear. Therefore, when I implement GetClassificationSpans, I donβt want to reassemble the whole file, but rather take the state of the beginning of the changed text and analyze the contents from this point.
I thought I could get the previous classifications as ClassificationTags. I did this using the IBufferTagAggregatorFactoryService class.
This works, but I'm not sure if this is the best way. Should I only create a tag aggregator for the entire classifier class, or can I create it every time I call GetClassificationSpans? Create a custom tag to remember parsing state?
Perhaps this is not the right way anyway, I am also interested in other suggestions.
Br, Gaspard
Edit: I found a good series of articles on the topic: http://www.hill30.com/MikeFeingoldBlog/index.php/2009/07/31/django-editor-in-vs-2010-part-1-colors/
source
share