I'm working on a VS2010 editor extension using MEF. Now I wish to hide code as needed, i.e. make specific code lines invisible. Here is an example: Hiding the regions in Visual Studio
Via MEF, I'm able to access TextView, TextBuffer, etc. But I haven't found a way to hide code, or change color or fonts of the displayed code. I guess the visibility, fonts and color are related. I'm not sure whether VSPackage can do it, even if it can, it seems too much for my requirement. I also thought about DTE object, no idea yet.
Maybe I just got some hope from http://msdn.microsoft.com/en-us/library/bb165040.aspx. However, is it possible to use this in a MEF component? It says to call QueryService for SVsTextManager. What does that mean?