I would like to create a Visual Studio addin which can identify if the caret currently is inside a method, class or namespace block, i.e. if the caret moves, the addin should be able to note down the status that the caret is currently inside so-and-so element.
If this can be extended to any C# block enclosed in curly braces, e.g. properties, that would be excellent.
Although I have checked for similar questions, please let me know if this is a repeat question so I can mark it accordingly. If other VS Addin-related questions are obviously helpful here, please let me know that too.
Basically, I would like to know what techniques we can use and how this can be accomplished.
EDIT: I guess the short answer to get started is:
- Get Visual Studio 2010 SDK SP1
- Probably use the "Extensibility" project template "Editor Text Adornment" or some other such template.