I’m writing another code coverage tool for .NET with Visual Studio 2008 integration.
Everything goes well except one thing: I can’t find a way to highlight some code chunks.
I need it to inform user about covered and not covered blocks.
You can see example of the feature I want on the next screenshot (from native VS code coverage toolset):
Can someone provide me a code snippet that highlights text in the code view window?
Links to appropriate MSDN articles related to VS2008 are also appreciated!
Thanks in advance.

I’ve found the answer, see code below:
More examples could be found in MetaScroll Visual Studio Addin.