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

Commit 9418131

Browse files
committed
Rename CommentsMargin V/M to PullRequestFileMargin
1 parent 477407e commit 9418131

File tree

6 files changed

+24
-39
lines changed

6 files changed

+24
-39
lines changed

src/GitHub.InlineReviews/GitHub.InlineReviews.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
<Compile Include="Services\PullRequestSessionManager.cs" />
107107
<Compile Include="Margins\InlineCommentMarginProvider.cs" />
108108
<Compile Include="Services\PullRequestSessionService.cs" />
109-
<Compile Include="ViewModels\CommentsMarginViewModel.cs" />
109+
<Compile Include="ViewModels\PullRequestFileMarginViewModel.cs" />
110110
<Compile Include="ViewModels\CommentViewModel.cs" />
111111
<Compile Include="ViewModels\ICommentThreadViewModel.cs" />
112112
<Compile Include="ViewModels\CommentThreadViewModel.cs" />
@@ -115,8 +115,8 @@
115115
<Compile Include="ViewModels\NewInlineCommentThreadViewModel.cs" />
116116
<Compile Include="ViewModels\PullRequestReviewCommentViewModel.cs" />
117117
<Compile Include="ViewModels\PullRequestStatusViewModel.cs" />
118-
<Compile Include="Views\CommentsMarginView.xaml.cs">
119-
<DependentUpon>CommentsMarginView.xaml</DependentUpon>
118+
<Compile Include="Views\PullRequestFileMarginView.xaml.cs">
119+
<DependentUpon>PullRequestFileMarginView.xaml</DependentUpon>
120120
</Compile>
121121
<Compile Include="Views\GlyphMarginGrid.xaml.cs">
122122
<DependentUpon>GlyphMarginGrid.xaml</DependentUpon>
@@ -430,7 +430,7 @@
430430
<SubType>Designer</SubType>
431431
<ContainsDesignTimeResources>true</ContainsDesignTimeResources>
432432
</Page>
433-
<Page Include="Views\CommentsMarginView.xaml">
433+
<Page Include="Views\PullRequestFileMarginView.xaml">
434434
<SubType>Designer</SubType>
435435
<Generator>MSBuild:Compile</Generator>
436436
</Page>

src/GitHub.InlineReviews/Margins/PullRequestFileMargin.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ internal class PullRequestFileMargin : IWpfTextViewMargin
2424
public const string MarginName = "PullRequestFileMargin";
2525

2626
readonly IWpfTextView textView;
27-
readonly CommentsMarginViewModel viewModel;
28-
readonly CommentsMarginView visualElement;
27+
readonly PullRequestFileMarginViewModel viewModel;
28+
readonly PullRequestFileMarginView visualElement;
2929
readonly IPullRequestSessionManager sessionManager;
3030

3131
bool isDisposed;
@@ -43,8 +43,8 @@ public PullRequestFileMargin(
4343
this.textView = textView;
4444
this.sessionManager = sessionManager;
4545

46-
viewModel = new CommentsMarginViewModel(toggleInlineCommentMarginCommand, goToSolutionOrPullRequestFileCommand);
47-
visualElement = new CommentsMarginView { DataContext = viewModel, ClipToBounds = true };
46+
viewModel = new PullRequestFileMarginViewModel(toggleInlineCommentMarginCommand, goToSolutionOrPullRequestFileCommand);
47+
visualElement = new PullRequestFileMarginView { DataContext = viewModel, ClipToBounds = true };
4848

4949
visibilitySubscription = viewModel.WhenAnyValue(x => x.Enabled).Subscribe(enabled =>
5050
{

src/GitHub.InlineReviews/ViewModels/CommentsMarginViewModel.cs renamed to src/GitHub.InlineReviews/ViewModels/PullRequestFileMarginViewModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33

44
namespace GitHub.InlineReviews.ViewModels
55
{
6-
public class CommentsMarginViewModel : ReactiveObject
6+
public class PullRequestFileMarginViewModel : ReactiveObject
77
{
88
bool enabled;
99
string fileName;
1010
int commentsInFile;
1111
bool marginEnabled;
1212

13-
public CommentsMarginViewModel(ICommand toggleInlineCommentMarginCommand, ICommand viewChangesCommand)
13+
public PullRequestFileMarginViewModel(ICommand toggleInlineCommentMarginCommand, ICommand viewChangesCommand)
1414
{
1515
ToggleInlineCommentMarginCommand = toggleInlineCommentMarginCommand;
1616
ViewChangesCommand = viewChangesCommand;

src/GitHub.InlineReviews/Views/CommentsMarginView.xaml.cs

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

src/GitHub.InlineReviews/Views/CommentsMarginView.xaml renamed to src/GitHub.InlineReviews/Views/PullRequestFileMarginView.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<UserControl x:Class="GitHub.InlineReviews.Views.CommentsMarginView"
1+
<UserControl x:Class="GitHub.InlineReviews.Views.PullRequestFileMarginView"
22
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
44
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using System;
2+
using System.Windows.Controls;
3+
4+
namespace GitHub.InlineReviews.Views
5+
{
6+
public partial class PullRequestFileMarginView : UserControl
7+
{
8+
public PullRequestFileMarginView()
9+
{
10+
InitializeComponent();
11+
}
12+
}
13+
}

0 commit comments

Comments
 (0)