Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 1b91bd5

Browse files
committed
Rename to GoToSolutionOrPullRequestFileCommand
Rename command from OpenFileInSolution to GoToSolutionOrPullRequestFile.
1 parent e4afad9 commit 1b91bd5

File tree

13 files changed

+34
-34
lines changed

13 files changed

+34
-34
lines changed

src/GitHub.App/Services/PullRequestEditorService.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public class PullRequestEditorService : IPullRequestEditorService
3636
readonly IPullRequestService pullRequestService;
3737
readonly IVsEditorAdaptersFactoryService vsEditorAdaptersFactory;
3838
readonly IStatusBarNotificationService statusBar;
39-
readonly IOpenFileInSolutionCommand openFileInSolutionCommand;
39+
readonly IGoToSolutionOrPullRequestFileCommand goToSolutionOrPullRequestFileCommand;
4040
readonly IEditorOptionsFactoryService editorOptionsFactoryService;
4141
readonly IUsageTracker usageTracker;
4242

@@ -46,23 +46,23 @@ public PullRequestEditorService(
4646
IPullRequestService pullRequestService,
4747
IVsEditorAdaptersFactoryService vsEditorAdaptersFactory,
4848
IStatusBarNotificationService statusBar,
49-
IOpenFileInSolutionCommand openFileInSolutionCommand,
49+
IGoToSolutionOrPullRequestFileCommand goToSolutionOrPullRequestFileCommand,
5050
IEditorOptionsFactoryService editorOptionsFactoryService,
5151
IUsageTracker usageTracker)
5252
{
5353
Guard.ArgumentNotNull(serviceProvider, nameof(serviceProvider));
5454
Guard.ArgumentNotNull(pullRequestService, nameof(pullRequestService));
5555
Guard.ArgumentNotNull(vsEditorAdaptersFactory, nameof(vsEditorAdaptersFactory));
5656
Guard.ArgumentNotNull(statusBar, nameof(statusBar));
57-
Guard.ArgumentNotNull(openFileInSolutionCommand, nameof(openFileInSolutionCommand));
58-
Guard.ArgumentNotNull(openFileInSolutionCommand, nameof(editorOptionsFactoryService));
57+
Guard.ArgumentNotNull(goToSolutionOrPullRequestFileCommand, nameof(goToSolutionOrPullRequestFileCommand));
58+
Guard.ArgumentNotNull(goToSolutionOrPullRequestFileCommand, nameof(editorOptionsFactoryService));
5959
Guard.ArgumentNotNull(usageTracker, nameof(usageTracker));
6060

6161
this.serviceProvider = serviceProvider;
6262
this.pullRequestService = pullRequestService;
6363
this.vsEditorAdaptersFactory = vsEditorAdaptersFactory;
6464
this.statusBar = statusBar;
65-
this.openFileInSolutionCommand = openFileInSolutionCommand;
65+
this.goToSolutionOrPullRequestFileCommand = goToSolutionOrPullRequestFileCommand;
6666
this.editorOptionsFactoryService = editorOptionsFactoryService;
6767
this.usageTracker = usageTracker;
6868
}
@@ -516,7 +516,7 @@ void EnableNavigateToEditor(IVsTextView vsTextView, IPullRequestSession session)
516516
{
517517
var commandGroup = VSConstants.CMDSETID.StandardCommandSet2K_guid;
518518
var commandId = (int)VSConstants.VSStd2KCmdID.RETURN;
519-
TextViewCommandDispatcher.AddCommandFilter(vsTextView, commandGroup, commandId, openFileInSolutionCommand);
519+
TextViewCommandDispatcher.AddCommandFilter(vsTextView, commandGroup, commandId, goToSolutionOrPullRequestFileCommand);
520520

521521
EnableNavigateStatusBarMessage(vsTextView, session);
522522
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
using GitHub.Commands;
2+
3+
namespace GitHub.Commands
4+
{
5+
public interface IGoToSolutionOrPullRequestFileCommand : IVsCommand
6+
{
7+
}
8+
}

src/GitHub.Exports/Commands/IOpenFileInSolutionCommand.cs

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/GitHub.Exports/GitHub.Exports.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156
<Compile Include="Commands\INextInlineCommentCommand.cs" />
157157
<Compile Include="Commands\InlineCommentNavigationParams.cs" />
158158
<Compile Include="Commands\IPreviousInlineCommentCommand.cs" />
159-
<Compile Include="Commands\IOpenFileInSolutionCommand.cs" />
159+
<Compile Include="Commands\IGoToSolutionOrPullRequestFileCommand.cs" />
160160
<Compile Include="Commands\IVsCommand.cs" />
161161
<Compile Include="Commands\IVsCommandBase.cs" />
162162
<Compile Include="Exports\ExportForProcess.cs" />

src/GitHub.Exports/Settings/PkgCmdID.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public static class PkgCmdIDList
1818
public const int createGistCommand = 0x400;
1919
public const int openLinkCommand = 0x100;
2020
public const int copyLinkCommand = 0x101;
21-
public const int openFileInSolutionCommand = 0x102;
21+
public const int goToSolutionOrPullRequestFileCommand = 0x102;
2222
public const int githubCommand = 0x320;
2323
public const int helpCommand = 0x321;
2424
public const int blameCommand = 0x500;

src/GitHub.InlineReviews/Margins/CommentsMargin.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ internal class CommentsMargin : IWpfTextViewMargin
3434
public CommentsMargin(
3535
IWpfTextView textView,
3636
IEnableInlineCommentsCommand enableInlineCommentsCommand,
37-
IOpenFileInSolutionCommand openFileInSolutionCommand,
37+
IGoToSolutionOrPullRequestFileCommand goToSolutionOrPullRequestFileCommand,
3838
IPullRequestSessionManager sessionManager)
3939
{
4040
this.textView = textView;
4141
this.sessionManager = sessionManager;
4242

43-
viewModel = new CommentsMarginViewModel(enableInlineCommentsCommand, openFileInSolutionCommand);
43+
viewModel = new CommentsMarginViewModel(enableInlineCommentsCommand, goToSolutionOrPullRequestFileCommand);
4444
visualElement = new CommentsMarginView { DataContext = viewModel, ClipToBounds = true };
4545

4646
visibilitySubscription = viewModel.WhenAnyValue(x => x.Enabled).Subscribe(enabled =>

src/GitHub.InlineReviews/Margins/CommentsMarginProvider.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,18 @@ internal sealed class CommentsMarginFactory : IWpfTextViewMarginProvider
2222
{
2323
readonly IPullRequestSessionManager sessionManager;
2424
readonly IEnableInlineCommentsCommand enableInlineCommentsCommand;
25-
readonly IOpenFileInSolutionCommand openFileInSolutionCommand;
25+
readonly IGoToSolutionOrPullRequestFileCommand goToSolutionOrPullRequestFileCommand;
2626
readonly IPackageSettings packageSettings;
2727

2828
[ImportingConstructor]
2929
public CommentsMarginFactory(
3030
IEnableInlineCommentsCommand enableInlineCommentsCommand,
31-
IOpenFileInSolutionCommand openFileInSolutionCommand,
31+
IGoToSolutionOrPullRequestFileCommand goToSolutionOrPullRequestFileCommand,
3232
IPullRequestSessionManager sessionManager,
3333
IPackageSettings packageSettings)
3434
{
3535
this.enableInlineCommentsCommand = enableInlineCommentsCommand;
36-
this.openFileInSolutionCommand = openFileInSolutionCommand;
36+
this.goToSolutionOrPullRequestFileCommand = goToSolutionOrPullRequestFileCommand;
3737
this.sessionManager = sessionManager;
3838
this.packageSettings = packageSettings;
3939
}
@@ -60,7 +60,7 @@ public IWpfTextViewMargin CreateMargin(IWpfTextViewHost wpfTextViewHost, IWpfTex
6060
return null;
6161
}
6262

63-
return new CommentsMargin(wpfTextViewHost.TextView, enableInlineCommentsCommand, openFileInSolutionCommand,
63+
return new CommentsMargin(wpfTextViewHost.TextView, enableInlineCommentsCommand, goToSolutionOrPullRequestFileCommand,
6464
sessionManager);
6565
}
6666

src/GitHub.InlineReviews/ViewModels/CommentsMarginViewModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ public class CommentsMarginViewModel : ReactiveObject
1010
int commentsInFile;
1111
bool marginEnabled;
1212

13-
public CommentsMarginViewModel(ICommand enableInlineComments, ICommand openFileInSolutionCommand)
13+
public CommentsMarginViewModel(ICommand enableInlineComments, ICommand viewChangesCommand)
1414
{
1515
EnableInlineCommentsCommand = enableInlineComments;
16-
ViewChangesCommand = openFileInSolutionCommand;
16+
ViewChangesCommand = viewChangesCommand;
1717
}
1818

1919
public bool Enabled

src/GitHub.VisualStudio/Commands/OpenFileInSolutionCommand.cs renamed to src/GitHub.VisualStudio/Commands/GoToSolutionOrPullRequestFileCommand.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
namespace GitHub.Commands
1616
{
17-
[Export(typeof(IOpenFileInSolutionCommand))]
18-
public class OpenFileInSolutionCommand : VsCommand, IOpenFileInSolutionCommand
17+
[Export(typeof(IGoToSolutionOrPullRequestFileCommand))]
18+
public class GoToSolutionOrPullRequestFileCommand : VsCommand, IGoToSolutionOrPullRequestFileCommand
1919
{
2020
/// <summary>
2121
/// Gets the GUID of the group the command belongs to.
@@ -25,7 +25,7 @@ public class OpenFileInSolutionCommand : VsCommand, IOpenFileInSolutionCommand
2525
/// <summary>
2626
/// Gets the numeric identifier of the command.
2727
/// </summary>
28-
public const int CommandId = PkgCmdIDList.openFileInSolutionCommand;
28+
public const int CommandId = PkgCmdIDList.goToSolutionOrPullRequestFileCommand;
2929

3030
readonly IGitHubServiceProvider serviceProvider;
3131
readonly Lazy<IVsEditorAdaptersFactoryService> editorAdapter;
@@ -35,7 +35,7 @@ public class OpenFileInSolutionCommand : VsCommand, IOpenFileInSolutionCommand
3535
readonly Lazy<IUsageTracker> usageTracker;
3636

3737
[ImportingConstructor]
38-
public OpenFileInSolutionCommand(
38+
public GoToSolutionOrPullRequestFileCommand(
3939
IGitHubServiceProvider serviceProvider,
4040
Lazy<IVsEditorAdaptersFactoryService> editorAdapter,
4141
Lazy<IPullRequestSessionManager> sessionManager,

src/GitHub.VisualStudio/GitHub.VisualStudio.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@
323323
<Compile Include="Commands\ShowCurrentPullRequestCommand.cs" />
324324
<Compile Include="Commands\ShowGitHubPaneCommand.cs" />
325325
<Compile Include="Commands\OpenPullRequestsCommand.cs" />
326-
<Compile Include="Commands\OpenFileInSolutionCommand.cs" />
326+
<Compile Include="Commands\GoToSolutionOrPullRequestFileCommand.cs" />
327327
<Compile Include="GitContextPackage.cs" />
328328
<Compile Include="GitHubPanePackage.cs" />
329329
<Compile Include="IServiceProviderPackage.cs" />

0 commit comments

Comments
 (0)