How to get access to Roslyn Syntax Tree (or similar) in a MEF component? #348
Unanswered
Hyperwavez
asked this question in
Q&A
Replies: 2 comments 1 reply
-
Not sure how to do that. Perhaps @jaredpar knows where to get started? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Import(typeof(VisualStudioWorkspace))]
public VisualStudioWorkspace Workspace { get; set; } From there, you can use Roslyn methods to get the token at a position, etc, etc. I think you will need to add the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In short, I'm trying to get access to the code context of the caret position in a KeyProcessor component.
For example:
I have access to the IWpfTextView interface by default, but I'm not sure where to go from there.
I read somewhere that the IBufferGraph interface has similar functionality as the Roslyn Syntax Tree, but I don't understand how to use it for that purpose.
Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions