Skip to content

Commit 851fb45

Browse files
committed
Nits. I'm not sure why tests are failing
1 parent cd677c7 commit 851fb45

File tree

2 files changed

+3
-16
lines changed

2 files changed

+3
-16
lines changed

src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/ExtractToComponentCodeActionProvider.cs

+3-15
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,14 @@
55
using System.Collections.Generic;
66
using System.Collections.Immutable;
77
using System.Diagnostics.CodeAnalysis;
8-
using System.IO;
98
using System.Linq;
10-
using System.Text;
119
using System.Threading;
1210
using System.Threading.Tasks;
13-
using ICSharpCode.Decompiler.CSharp.Syntax;
1411
using Microsoft.AspNetCore.Razor.Language;
15-
using Microsoft.AspNetCore.Razor.Language.Components;
16-
using Microsoft.AspNetCore.Razor.Language.Extensions;
17-
using Microsoft.AspNetCore.Razor.Language.Intermediate;
18-
using Microsoft.AspNetCore.Razor.Language.Legacy;
1912
using Microsoft.AspNetCore.Razor.Language.Syntax;
2013
using Microsoft.AspNetCore.Razor.LanguageServer.CodeActions.Models;
21-
using Microsoft.AspNetCore.Razor.PooledObjects;
2214
using Microsoft.AspNetCore.Razor.Threading;
23-
using Microsoft.AspNetCore.Razor.Utilities;
24-
using Microsoft.CodeAnalysis.CSharp.Syntax;
25-
using Microsoft.CodeAnalysis.Razor;
2615
using Microsoft.CodeAnalysis.Razor.Logging;
27-
using Microsoft.CodeAnalysis.Razor.Workspaces;
2816
using Microsoft.CodeAnalysis.Text;
2917
using Microsoft.VisualStudio.LanguageServer.Protocol;
3018

@@ -74,7 +62,7 @@ public Task<ImmutableArray<RazorVSInternalCodeAction>> ProvideAsync(RazorCodeAct
7462
return SpecializedTasks.EmptyImmutableArray<RazorVSInternalCodeAction>();
7563
}
7664

77-
var actionParams = CreateInitialActionParams(context, startElementNode, @namespace);
65+
var actionParams = CreateInitialActionParams(context, startElementNode, @namespace);
7866

7967
ProcessSelection(startElementNode, endElementNode, actionParams);
8068

@@ -209,7 +197,7 @@ private static void ProcessSelection(MarkupElementSyntax startElementNode, Marku
209197
// </span>|}|}
210198
// </div>
211199
// In this case, we need to find the smallest set of complete elements that covers the entire selection.
212-
200+
213201
// Find the closest containing sibling pair that encompasses both the start and end elements
214202
var (extractStart, extractEnd) = FindContainingSiblingPair(startElementNode, endElementNode);
215203

@@ -324,7 +312,7 @@ private static void AddUsingFromTagHelperInfo(TagHelperInfo tagHelperInfo, HashS
324312

325313
// This is a bit inefficient because at most 'k' string operations are performed (k = parts in the namespace),
326314
// for each potential using directive.
327-
315+
328316
var parts = typeNamespace.Split('.');
329317
for (var i = 0; i < parts.Length; i++)
330318
{

src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/CodeActionEndToEndTest.NetFx.cs

-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ private GenerateMethodCodeActionResolver[] CreateRazorCodeActionResolvers(
6161
razorFormattingService)
6262
];
6363

64-
6564
private ExtractToComponentCodeActionResolver[] CreateExtractComponentCodeActionResolver(string filePath, RazorCodeDocument codeDocument)
6665
{
6766
return [

0 commit comments

Comments
 (0)