Reputation: 12469
I am writing an extension for Visual Studio 2012 that contains an ICompletionSourceProvider. I need to determine the type of the identifier at the location of the cursor. I tried the following approaches:
It is obvious that Visual Studio has that information, but how can I retrieve it? I only need it to work when editing C# files.
Upvotes: 1
Views: 184
Reputation: 19021
Visual Studio 2012 offers no public API to access this information. We have it, yes, but you can't get to it. You might want to take a look at the Roslyn CTP, where we are working on a set of APIs to support scenarios exactly like your own.
Disclosure: I'm on the Roslyn team.
Upvotes: 2