-
-
Notifications
You must be signed in to change notification settings - Fork 41
Light up "modern command handling" in Visual Studio 2017 version 15.6+ #161
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
Conversation
@sharwell I have set as StartUp Project GitDiffMargin.Extension and when I run it I get the following exception in the new VS instance
I also see that the vsix miss quite some dlls like LibGit2Sharp, MvvmLight... |
This change adds a new project, GitDiffMargin.Extension, which is responsible for creating the VSIX output. The refactoring is a supporting change for future work which provides improved support for APIs only available in later versions of Visual Studio without breaking support for Visual Studio 2012+ users.
|
I compared the builds to the latest master branch build and found the following items missing:
I'll review the build to figure out why these aren't getting included correctly and update the pull request to fix it. |
* GitDiffMargin.csproj items are included by CopyToOutputDirectory rather than IncludeInVSIX * MvvmLightLibs is no longer treated as a development dependency
@laurentkempe Alright the latest should include the correct outputs. Sorry for the confusion! |
No worries @sharwell I will have a look at it asap |
Nice. :-) |
TextViewCommandFilter
to implement commands for all versions prior to Visual Studio 2017 version 15.6ICommandHandler
interface to implement commands in Visual Studio 2017 version 15.6 and laterThis change should address the "Gold Bar" notification saying Git Diff Margin was responsible for editor slowness. When using chained command filters, the slowness detection doesn't know how to assign blame to a specific item in the chain, so Git Diff Margin can be blamed for cases where it's doing nothing but passing the command along the chain. The new code uses a declarative approach to handle specific commands, and is no longer part of the handling process for unrelated editor commands.
The code is based loosely on the Visual Studio 2017 backwards compatible editor command sample, but continues to use the
IOleCommandTarget
implementation for both old and new command handling approaches.@olegtk I'm not sure y'all meant to make it this difficult to work with the new API, but if we have to multiply the number of assemblies by 4 every time we want to support a new editor feature this is going to get out of hand really fast. Please make sure that future APIs are designed from the perspective of users who are supporting earlier clients by default, with clients only supporting new APIs being the outlier not the standard.