Skip to content
Discussion options

You must be logged in to vote

I ended up giving up on this specific feature, I just created a command where I prompt the user to the Options -> CodeLens menu and hope that the user is smart enough to disable the codelenses of my extension, in case they want that.

The code looks very much like this:

public async Task ShowCodeLensMenuAsync() { await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); var dte = Package.GetGlobalService(typeof(DTE)) as DTE; EnvDTE.Commands commands = dte.Commands; dte.ExecuteCommand("EditorContextMenus.CodeLens.CodeLensOptions"); }

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
0 participants