Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DTE2 members to implement in new Extensibility Model #367

Open
LeeMSilver opened this issue Apr 29, 2024 · 0 comments
Open

DTE2 members to implement in new Extensibility Model #367

LeeMSilver opened this issue Apr 29, 2024 · 0 comments

Comments

@LeeMSilver
Copy link

Per issue #352 my extension may not be able to use await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); and therefore not be convertible to the new Extensibility Model (EM).

I only use that method for accessing some DTE2 members and its use is the reason that my extension is in-proc. If the EM could implement the following DTE2 members my extension conversion can continue (and be out-of-proc.)

  • DTE.ExecuteCommand("File.Close") and DTE.ExecuteCommand("File.FormatDocument") -see issue Request for a Close() method #337.

  • `DTE,StatusBar

  • DTE.ExecuteCommand() -used in a number of places (e.g. "EditorContextMenus.FileHealthIndicator.RunCustomCodeCleanup") multiple times per command.

How they are implemented (e.g. in their own class, as extension methods, etc.) is of no concern, nor is it a concern if any of them have to use await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); as long as they return on the calling thread (or any thread, so long as execution can continue and possibly invoke DTE.ExecuteCommand() multiple times.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant