I am very new to writing VSIX extensions, so please forgive me for any obvious questions. I am writing a VSIX Extension in which I will need to view the current conten type(s). I currently have the following 2 lines in my code:
view.TextBuffer.ContentType.DisplayName view.TextBuffer.ContentType.TypeName
While debugging my extension, both of these return "Basic", which makes sense, since I am viewing a vb file in my test instance of Visual Studio 2017 (and my extension is intended primarily for vb files), but I want to be able to detect some of the types listed at:
https://docs.microsoft.com/en-us/dotnet/api/microsoft.visualstudio.language.standardclassification.istandardclassificationservice?redirectedfrom=MSDN&view=visualstudiosdk-2017
The 2 content types (other than "Basic") that I want to be able to detect are "Comment" and "WhiteSpace". There are obviously parts of the document that are multiple content types, but if the DisplayName & TypeName properties only return a String, how can I determine all of the content types? Am I doing something wrong (or trying to look at the wrong properties)?
Nathan Sokalski njsokalski@hotmail.com http://www.nathansokalski.com/