I’m writing a (very) simple Visual Studio addin. Two things that would make it work nicer are:
-
A context menu.
-
Knowing the caret position in the current document (so I can inject text at that position).
Any ideas?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To add a context menu to your addin, you create a CommandBarPopup from:
You can view a sample here.
The second part of your question is a little simpler, the current ‘selection’ (or insertion point) is handled by:
‘_applicationObject’ is an instance the DTE Application object created by the add-in project wizard.