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

Commit 99b98e8

Browse files
committed
Rename CommentsMargin to PullRequestFileMargin
This margin appears on solution files that have a corresponding PR file (file with changes in current PR).
1 parent 4fcb105 commit 99b98e8

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

src/GitHub.InlineReviews/GitHub.InlineReviews.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@
7373
<Compile Include="Commands\InlineCommentNavigationCommand.cs" />
7474
<Compile Include="Commands\PreviousInlineCommentCommand.cs" />
7575
<Compile Include="Commands\NextInlineCommentCommand.cs" />
76-
<Compile Include="Margins\CommentsMargin.cs" />
77-
<Compile Include="Margins\CommentsMarginProvider.cs" />
76+
<Compile Include="Margins\PullRequestFileMargin.cs" />
77+
<Compile Include="Margins\PullRequestFileMarginProvider.cs" />
7878
<Compile Include="Glyph\GlyphData.cs" />
7979
<Compile Include="Glyph\GlyphMargin.cs" />
8080
<Compile Include="Glyph\GlyphMarginVisualManager.cs" />

src/GitHub.InlineReviews/Margins/CommentsMargin.cs renamed to src/GitHub.InlineReviews/Margins/PullRequestFileMargin.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,12 @@
1616

1717
namespace GitHub.InlineReviews.Margins
1818
{
19-
internal class CommentsMargin : IWpfTextViewMargin
19+
/// <summary>
20+
/// This margin appears on solution files that have a corresponding PR file (file with changes in current PR).
21+
/// </summary>
22+
internal class PullRequestFileMargin : IWpfTextViewMargin
2023
{
21-
public const string MarginName = "CommentsMargin";
24+
public const string MarginName = "PullRequestFileMargin";
2225

2326
readonly IWpfTextView textView;
2427
readonly CommentsMarginViewModel viewModel;
@@ -31,7 +34,7 @@ internal class CommentsMargin : IWpfTextViewMargin
3134
IDisposable optionChangedSubscription;
3235
IDisposable visibilitySubscription;
3336

34-
public CommentsMargin(
37+
public PullRequestFileMargin(
3538
IWpfTextView textView,
3639
IToggleInlineCommentMarginCommand toggleInlineCommentMarginCommand,
3740
IGoToSolutionOrPullRequestFileCommand goToSolutionOrPullRequestFileCommand,

src/GitHub.InlineReviews/Margins/CommentsMarginProvider.cs renamed to src/GitHub.InlineReviews/Margins/PullRequestFileMarginProvider.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,20 @@ namespace GitHub.InlineReviews.Margins
1313
/// Export a <see cref="IWpfTextViewMarginProvider"/>, which returns an instance of the margin for the editor to use.
1414
/// </summary>
1515
[Export(typeof(IWpfTextViewMarginProvider))]
16-
[Name(CommentsMargin.MarginName)]
16+
[Name(PullRequestFileMargin.MarginName)]
1717
[Order(After = PredefinedMarginNames.ZoomControl)]
1818
[MarginContainer(PredefinedMarginNames.BottomControl)] // Set the container to the bottom of the editor window
1919
[ContentType("text")] // Show this margin for all text-based types
2020
[TextViewRole(PredefinedTextViewRoles.Editable)]
21-
internal sealed class CommentsMarginFactory : IWpfTextViewMarginProvider
21+
internal sealed class PullRequestFileMarginProvider : IWpfTextViewMarginProvider
2222
{
2323
readonly IPullRequestSessionManager sessionManager;
2424
readonly IToggleInlineCommentMarginCommand enableInlineCommentsCommand;
2525
readonly IGoToSolutionOrPullRequestFileCommand goToSolutionOrPullRequestFileCommand;
2626
readonly IPackageSettings packageSettings;
2727

2828
[ImportingConstructor]
29-
public CommentsMarginFactory(
29+
public PullRequestFileMarginProvider(
3030
IToggleInlineCommentMarginCommand enableInlineCommentsCommand,
3131
IGoToSolutionOrPullRequestFileCommand goToSolutionOrPullRequestFileCommand,
3232
IPullRequestSessionManager sessionManager,
@@ -60,7 +60,7 @@ public IWpfTextViewMargin CreateMargin(IWpfTextViewHost wpfTextViewHost, IWpfTex
6060
return null;
6161
}
6262

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

0 commit comments

Comments
 (0)