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

Commit 4fcb105

Browse files
committed
Rename to ToggleInlineCommentMarginCommand
Rename EnableInlineCommentsCommand to ToggleInlineCommentMarginCommand.
1 parent 1b91bd5 commit 4fcb105

File tree

9 files changed

+16
-16
lines changed

9 files changed

+16
-16
lines changed

src/GitHub.Exports/Commands/IEnableInlineCommentsCommand.cs renamed to src/GitHub.Exports/Commands/IToggleInlineCommentMarginCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace GitHub.InlineReviews.Commands
44
{
5-
public interface IEnableInlineCommentsCommand : IVsCommand
5+
public interface IToggleInlineCommentMarginCommand : IVsCommand
66
{
77
}
88
}

src/GitHub.Exports/GitHub.Exports.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145
<ItemGroup>
146146
<Compile Include="Commands\ICopyLinkCommand.cs" />
147147
<Compile Include="Commands\IBlameLinkCommand.cs" />
148-
<Compile Include="Commands\IEnableInlineCommentsCommand.cs" />
148+
<Compile Include="Commands\IToggleInlineCommentMarginCommand.cs" />
149149
<Compile Include="Commands\IOpenLinkCommand.cs" />
150150
<Compile Include="Commands\ICreateGistCommand.cs" />
151151
<Compile Include="Commands\IShowCurrentPullRequestCommand.cs" />

src/GitHub.Exports/Settings/PkgCmdID.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ public static class PkgCmdIDList
2626
// IDs defined in InlineReviewsPackage.vsct
2727
public const int NextInlineCommentId = 0x1001;
2828
public const int PreviousInlineCommentId = 0x1002;
29-
public const int EnableInlineCommentsId = 0x1003; // TODO: Add to .vsct
29+
public const int toggleInlineCommentMarginCommand = 0x1003; // TODO: Add to .vsct
3030
};
3131
}

src/GitHub.InlineReviews/Commands/EnableInlineCommentsCommand.cs renamed to src/GitHub.InlineReviews/Commands/ToggleInlineCommentMarginCommand.cs

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

1212
namespace GitHub.InlineReviews.Commands
1313
{
14-
[Export(typeof(IEnableInlineCommentsCommand))]
15-
public class EnableInlineCommentsCommand : VsCommand, IEnableInlineCommentsCommand
14+
[Export(typeof(IToggleInlineCommentMarginCommand))]
15+
public class ToggleInlineCommentMarginCommand : VsCommand, IToggleInlineCommentMarginCommand
1616
{
1717
/// <summary>
1818
/// Gets the GUID of the group the command belongs to.
@@ -22,13 +22,13 @@ public class EnableInlineCommentsCommand : VsCommand, IEnableInlineCommentsComma
2222
/// <summary>
2323
/// Gets the numeric identifier of the command.
2424
/// </summary>
25-
public const int CommandId = PkgCmdIDList.EnableInlineCommentsId;
25+
public const int CommandId = PkgCmdIDList.toggleInlineCommentMarginCommand;
2626

2727
readonly Lazy<IVsTextManager> textManager;
2828
readonly Lazy<IVsEditorAdaptersFactoryService> editorAdapter;
2929

3030
[ImportingConstructor]
31-
public EnableInlineCommentsCommand(
31+
public ToggleInlineCommentMarginCommand(
3232
IGitHubServiceProvider serviceProvider,
3333
Lazy<IVsEditorAdaptersFactoryService> editorAdapter) : base(CommandSet, CommandId)
3434
{

src/GitHub.InlineReviews/GitHub.InlineReviews.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
<Compile Include="..\common\SolutionInfo.cs">
7070
<Link>Properties\SolutionInfo.cs</Link>
7171
</Compile>
72-
<Compile Include="Commands\EnableInlineCommentsCommand.cs" />
72+
<Compile Include="Commands\ToggleInlineCommentMarginCommand.cs" />
7373
<Compile Include="Commands\InlineCommentNavigationCommand.cs" />
7474
<Compile Include="Commands\PreviousInlineCommentCommand.cs" />
7575
<Compile Include="Commands\NextInlineCommentCommand.cs" />

src/GitHub.InlineReviews/Margins/CommentsMargin.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ internal class CommentsMargin : IWpfTextViewMargin
3333

3434
public CommentsMargin(
3535
IWpfTextView textView,
36-
IEnableInlineCommentsCommand enableInlineCommentsCommand,
36+
IToggleInlineCommentMarginCommand toggleInlineCommentMarginCommand,
3737
IGoToSolutionOrPullRequestFileCommand goToSolutionOrPullRequestFileCommand,
3838
IPullRequestSessionManager sessionManager)
3939
{
4040
this.textView = textView;
4141
this.sessionManager = sessionManager;
4242

43-
viewModel = new CommentsMarginViewModel(enableInlineCommentsCommand, goToSolutionOrPullRequestFileCommand);
43+
viewModel = new CommentsMarginViewModel(toggleInlineCommentMarginCommand, 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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ namespace GitHub.InlineReviews.Margins
2121
internal sealed class CommentsMarginFactory : IWpfTextViewMarginProvider
2222
{
2323
readonly IPullRequestSessionManager sessionManager;
24-
readonly IEnableInlineCommentsCommand enableInlineCommentsCommand;
24+
readonly IToggleInlineCommentMarginCommand enableInlineCommentsCommand;
2525
readonly IGoToSolutionOrPullRequestFileCommand goToSolutionOrPullRequestFileCommand;
2626
readonly IPackageSettings packageSettings;
2727

2828
[ImportingConstructor]
2929
public CommentsMarginFactory(
30-
IEnableInlineCommentsCommand enableInlineCommentsCommand,
30+
IToggleInlineCommentMarginCommand enableInlineCommentsCommand,
3131
IGoToSolutionOrPullRequestFileCommand goToSolutionOrPullRequestFileCommand,
3232
IPullRequestSessionManager sessionManager,
3333
IPackageSettings packageSettings)

src/GitHub.InlineReviews/ViewModels/CommentsMarginViewModel.cs

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

13-
public CommentsMarginViewModel(ICommand enableInlineComments, ICommand viewChangesCommand)
13+
public CommentsMarginViewModel(ICommand toggleInlineCommentMarginCommand, ICommand viewChangesCommand)
1414
{
15-
EnableInlineCommentsCommand = enableInlineComments;
15+
ToggleInlineCommentMarginCommand = toggleInlineCommentMarginCommand;
1616
ViewChangesCommand = viewChangesCommand;
1717
}
1818

@@ -40,7 +40,7 @@ public bool MarginEnabled
4040
set { this.RaiseAndSetIfChanged(ref marginEnabled, value); }
4141
}
4242

43-
public ICommand EnableInlineCommentsCommand { get; }
43+
public ICommand ToggleInlineCommentMarginCommand { get; }
4444

4545
public ICommand ViewChangesCommand { get; }
4646
}

src/GitHub.InlineReviews/Views/CommentsMarginView.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</UserControl.Resources>
1818

1919
<StackPanel Orientation="Horizontal">
20-
<CheckBox Command="{Binding EnableInlineCommentsCommand}" IsChecked="{Binding MarginEnabled, Mode=OneWay}" Margin="4 0">
20+
<CheckBox Command="{Binding ToggleInlineCommentMarginCommand}" IsChecked="{Binding MarginEnabled, Mode=OneWay}" Margin="4 0">
2121
<TextBlock VerticalAlignment="Center">
2222
<Run Text="{Binding FileName}"/>
2323
<ghfvs:OcticonImage Icon="comment_discussion" Height="10" Margin="-2 0" />

0 commit comments

Comments
 (0)