title: VS2010 syntax coloring: how to obtain the previous classification type
body: <p>I'm trying to play with the new syntax coloring capabilities of VS2010 based on Noah Richards' diff coloring sample. The goal is to create syntax coloring for SpecFlow (<a href="http://www.specflow.org" rel="nofollow noreferrer">http://www.specflow.org</a>).</p>
  
  <p>In my case, finding the syntax elements are fairly complex and not line-level. Therefore, when I implement the GetClassificationSpans I don't want to re-parse the entire file, but rather take the state of the beginning of the changed text and parsing the content from that point on.</p>
  
  <p>I thought that I can get the previous classifications as ClassificationTags. I did this using the IBufferTagAggregatorFactoryService class. </p>
  
  <p>It works, but I'm not sure whether this is the best way to go. Shall I create only tag aggregator for the entire classifier class or I can create it every time when GetClassificationSpans is called? Shall I create a special tag to remember the parsing state?</p>
  
  <p>Maybe this is anyway not the right way to go, I'm also interested in other suggestions.</p>
  
  <p>Br,
  Gaspar</p>
  
  <p>Edit: I've found a good article series in the topic: <a href="http://www.hill30.com/MikeFeingoldBlog/index.php/2009/07/31/django-editor-in-vs-2010-part-1-colors/" rel="nofollow noreferrer">http://www.hill30.com/MikeFeingoldBlog/index.php/2009/07/31/django-editor-in-vs-2010-part-1-colors/</a></p>