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

Commit 9ef8675

Browse files
committed
Keep CA happy - take 2
1 parent 5560be5 commit 9ef8675

File tree

4 files changed

+5
-23
lines changed

4 files changed

+5
-23
lines changed

src/GitHub.InlineReviews/Margins/CommentsMargin.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ internal class CommentsMargin : IWpfTextViewMargin
2424
readonly CommentsMarginViewModel viewModel;
2525
readonly CommentsMarginView visualElement;
2626
readonly IPullRequestSessionManager sessionManager;
27-
readonly IPullRequestEditorService pullRequestEditorService;
2827

2928
bool isDisposed;
3029

@@ -36,12 +35,10 @@ public CommentsMargin(
3635
IWpfTextView textView,
3736
IEnableInlineCommentsCommand enableInlineCommentsCommand,
3837
IOpenFileInSolutionCommand openFileInSolutionCommand,
39-
IPullRequestSessionManager sessionManager,
40-
IPullRequestEditorService pullRequestEditorService)
38+
IPullRequestSessionManager sessionManager)
4139
{
4240
this.textView = textView;
4341
this.sessionManager = sessionManager;
44-
this.pullRequestEditorService = pullRequestEditorService;
4542

4643
viewModel = new CommentsMarginViewModel(enableInlineCommentsCommand, openFileInSolutionCommand);
4744
visualElement = new CommentsMarginView { DataContext = viewModel, ClipToBounds = true };

src/GitHub.InlineReviews/Margins/CommentsMarginProvider.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ namespace GitHub.InlineReviews.Margins
2121
internal sealed class CommentsMarginFactory : IWpfTextViewMarginProvider
2222
{
2323
readonly IPullRequestSessionManager sessionManager;
24-
readonly IPullRequestEditorService pullRequestEditorService;
2524
readonly IEnableInlineCommentsCommand enableInlineCommentsCommand;
2625
readonly IOpenFileInSolutionCommand openFileInSolutionCommand;
2726
readonly IPackageSettings packageSettings;
@@ -31,13 +30,11 @@ public CommentsMarginFactory(
3130
IEnableInlineCommentsCommand enableInlineCommentsCommand,
3231
IOpenFileInSolutionCommand openFileInSolutionCommand,
3332
IPullRequestSessionManager sessionManager,
34-
IPullRequestEditorService pullRequestEditorService,
3533
IPackageSettings packageSettings)
3634
{
3735
this.enableInlineCommentsCommand = enableInlineCommentsCommand;
3836
this.openFileInSolutionCommand = openFileInSolutionCommand;
3937
this.sessionManager = sessionManager;
40-
this.pullRequestEditorService = pullRequestEditorService;
4138
this.packageSettings = packageSettings;
4239
}
4340

@@ -64,7 +61,7 @@ public IWpfTextViewMargin CreateMargin(IWpfTextViewHost wpfTextViewHost, IWpfTex
6461
}
6562

6663
return new CommentsMargin(wpfTextViewHost.TextView, enableInlineCommentsCommand, openFileInSolutionCommand,
67-
sessionManager, pullRequestEditorService);
64+
sessionManager);
6865
}
6966

7067
bool IsDiffView(ITextView textView) => textView.Roles.Contains("DIFF");

src/GitHub.InlineReviews/Margins/InlineCommentMargin.cs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,12 @@
1717

1818
namespace GitHub.InlineReviews.Margins
1919
{
20-
public class InlineCommentMargin : IWpfTextViewMargin
20+
public sealed class InlineCommentMargin : IWpfTextViewMargin
2121
{
2222
public const string MarginName = "InlineComment";
2323
const string MarginPropertiesName = "Indicator Margin"; // Same background color as Glyph margin
2424

2525
readonly IWpfTextView textView;
26-
readonly IInlineCommentPeekService peekService;
27-
readonly IEditorFormatMapService editorFormatMapService;
28-
readonly IViewTagAggregatorFactoryService tagAggregatorFactory;
2926
readonly IPullRequestSessionManager sessionManager;
3027
readonly Grid marginGrid;
3128

@@ -40,13 +37,9 @@ public InlineCommentMargin(
4037
IInlineCommentPeekService peekService,
4138
IEditorFormatMapService editorFormatMapService,
4239
IViewTagAggregatorFactoryService tagAggregatorFactory,
43-
IPackageSettings packageSettings,
4440
Lazy<IPullRequestSessionManager> sessionManager)
4541
{
4642
textView = wpfTextViewHost.TextView;
47-
this.peekService = peekService;
48-
this.editorFormatMapService = editorFormatMapService;
49-
this.tagAggregatorFactory = tagAggregatorFactory;
5043
this.sessionManager = sessionManager.Value;
5144

5245
// Default to not show comment margin

src/GitHub.InlineReviews/Margins/InlineCommentMarginProvider.cs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,33 +18,28 @@ namespace GitHub.InlineReviews.Margins
1818
[TextViewRole(PredefinedTextViewRoles.Interactive)]
1919
internal sealed class InlineCommentMarginProvider : IWpfTextViewMarginProvider
2020
{
21-
readonly IGitHubServiceProvider serviceProvider;
2221
readonly IEditorFormatMapService editorFormatMapService;
2322
readonly IViewTagAggregatorFactoryService tagAggregatorFactory;
2423
readonly IInlineCommentPeekService peekService;
25-
readonly IPackageSettings packageSettings;
2624
readonly Lazy<IPullRequestSessionManager> sessionManager;
2725

2826
[ImportingConstructor]
2927
public InlineCommentMarginProvider(
3028
IGitHubServiceProvider serviceProvider,
3129
IEditorFormatMapService editorFormatMapService,
3230
IViewTagAggregatorFactoryService tagAggregatorFactory,
33-
IInlineCommentPeekService peekService,
34-
IPackageSettings packageSettings)
31+
IInlineCommentPeekService peekService)
3532
{
36-
this.serviceProvider = serviceProvider;
3733
this.editorFormatMapService = editorFormatMapService;
3834
this.tagAggregatorFactory = tagAggregatorFactory;
3935
this.peekService = peekService;
40-
this.packageSettings = packageSettings;
4136
sessionManager = new Lazy<IPullRequestSessionManager>(() => serviceProvider.GetService<IPullRequestSessionManager>());
4237
}
4338

4439
public IWpfTextViewMargin CreateMargin(IWpfTextViewHost wpfTextViewHost, IWpfTextViewMargin parent)
4540
{
4641
return new InlineCommentMargin(
47-
wpfTextViewHost, peekService, editorFormatMapService, tagAggregatorFactory, packageSettings, sessionManager);
42+
wpfTextViewHost, peekService, editorFormatMapService, tagAggregatorFactory, sessionManager);
4843
}
4944
}
5045
}

0 commit comments

Comments
 (0)