This repository was archived by the owner on Jun 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Initialize GitHubPane and menus asynchronously #1569
Merged
Merged
Changes from 24 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
c20e618
Create MEF commands on background thread
jcansdale 0527497
Allow menuService.AddCommands to be called from a b/g thread
jcansdale 266ec58
Construct PullRequestStatusBarManager using MEF on b/g thread
jcansdale 5730008
Factor b/g loading menu code into AsyncMenuPackage
jcansdale ec46954
Restore missing metrics
jcansdale 48cb0cc
Allow MEF to refresh its cache on a background thread
jcansdale ca0a273
Use ContentPresenter instead of ContentControl
jcansdale f66afaf
Use package without MEF dependency for GitHubPane
jcansdale 47d3753
Revert "Factor b/g loading menu code into AsyncMenuPackage"
jcansdale e9c8db9
Revert "Allow menuService.AddCommands to be called from a b/g thread"
jcansdale 2fc764b
Add placeholder initializing and error views
jcansdale e6ee44d
Add GetViewModelAsync for GitHubPane
jcansdale ed0cb39
Remove redundant initialization code
jcansdale 5dcf605
Fixed typo
jcansdale 29508bb
Make error text box read only
jcansdale 89ffd87
Show `Initializing...` while MEF is loading
jcansdale e3158d2
Make GitHubPane await initialization of IGitHubPaneViewModel
jcansdale 255b007
Remove empty IncrementNumberOfShowCurrentPullRequest method
jcansdale 4746859
Cast IMenuCommandService on Main thread
jcansdale a9c5c16
Use JoinableTask rather than TaskCompletionSource
jcansdale 0504119
This page is intentionally left blank
jcansdale cb26608
Use JoinableTaskFactory from parent AsyncPackage
jcansdale 7511113
Retrieve IGitHubServiceProvider asynchronously
jcansdale 0983ef0
Moved NumberOfShowCurrentPullRequest tracking into command
jcansdale 39d77aa
Keep CA happy
jcansdale File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using System; | ||
using System.Runtime.InteropServices; | ||
using GitHub.VisualStudio.UI; | ||
using Microsoft.VisualStudio.Shell; | ||
|
||
namespace GitHub.VisualStudio | ||
{ | ||
/// <summary> | ||
/// This is the host package for the <see cref="GitHubPane"/> tool window. | ||
/// </summary> | ||
/// <remarks> | ||
/// This package mustn't use MEF. | ||
/// See: https://github.com/github/VisualStudio/issues/1550 | ||
/// </remarks> | ||
[PackageRegistration(UseManagedResourcesOnly = true, AllowsBackgroundLoading = true)] | ||
[Guid(Guids.GitHubPanePackageId)] | ||
[ProvideToolWindow(typeof(GitHubPane), Orientation = ToolWindowOrientation.Right, | ||
Style = VsDockStyle.Tabbed, Window = EnvDTE.Constants.vsWindowKindSolutionExplorer)] | ||
public sealed class GitHubPanePackage : AsyncPackage | ||
{ | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should bring back the
SwitchToMainThreadAsync
call that you removed. I expect themenuService
is an STA COM object that requires the UI thread.