Skip to content

Commit ebb4980

Browse files
author
N. Taylor Mullen
committed
Addressed code review comments.
1 parent 7462e12 commit ebb4980

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

src/Razor/src/Microsoft.VisualStudio.LanguageServerClient.Razor/RazorEditorFactory.cs

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using System;
1+
// Copyright (c) .NET Foundation. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3+
4+
using System;
25
using System.Runtime.InteropServices;
36
using Microsoft.Internal.VisualStudio.Shell.Interop;
47
using Microsoft.VisualStudio.ComponentModelHost;
@@ -13,7 +16,7 @@
1316
namespace Microsoft.VisualStudio.LanguageServerClient.Razor
1417
{
1518
[Guid(EditorFactoryGuidString)]
16-
public class RazorEditorFactory : EditorFactory
19+
internal class RazorEditorFactory : EditorFactory
1720
{
1821
private const string EditorFactoryGuidString = "3dfdce9e-1799-4372-8aa6-d8e65182fdfc";
1922
private const string RazorLSPEditorFeatureFlag = "Razor.LSP.Editor";
@@ -45,7 +48,7 @@ public RazorEditorFactory(AsyncPackage package) : base(package)
4548
});
4649
}
4750

48-
private bool IsLSPRazorEditorEnabled
51+
private bool IsRazorLSPEditorEnabled
4952
{
5053
get
5154
{
@@ -74,7 +77,7 @@ public override int CreateEditorInstance(
7477
out Guid cmdUI,
7578
out int cancelled)
7679
{
77-
if (!IsLSPRazorEditorEnabled)
80+
if (!IsRazorLSPEditorEnabled)
7881
{
7982
docView = default;
8083
docData = default;

src/Razor/src/Microsoft.VisualStudio.LanguageServerClient.Razor/RazorLSPContentTypeDefinition.cs

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using System.ComponentModel.Composition;
1+
// Copyright (c) .NET Foundation. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3+
4+
using System.ComponentModel.Composition;
25
using Microsoft.VisualStudio.LanguageServer.Client;
36
using Microsoft.VisualStudio.Utilities;
47

@@ -18,7 +21,7 @@ internal sealed class RazorLSPContentTypeDefinition
1821
[BaseDefinition(CodeRemoteContentDefinition.CodeRemoteContentTypeName)]
1922
public ContentTypeDefinition RazorLSPContentType { get; set; }
2023

21-
// We can't assocaite the Razor LSP content type with the above file extensions because there's already a content type
24+
// We can't associate the Razor LSP content type with the above file extensions because there's already a content type
2225
// associated with them. Instead, we utilize our RazorEditorFactory to assign the RazorLSPContentType to .razor/.cshtml
2326
// files.
2427
}

src/Razor/src/Microsoft.VisualStudio.RazorExtension/RazorPackage.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ namespace Microsoft.VisualStudio.RazorExtension
1212
{
1313
// We attach to the 51st priority order because the traditional Web + XML editors have priority 50. We need to be loaded prior to them
1414
// since we want to have the option to own the experience for Razor files
15-
[ProvideEditorExtension(typeof(RazorEditorFactory), RazorLSPContentTypeDefinition.CSHTMLFileExtension, 52, NameResourceID = 101)]
16-
[ProvideEditorExtension(typeof(RazorEditorFactory), RazorLSPContentTypeDefinition.RazorFileExtension, 52, NameResourceID = 101)]
15+
[ProvideEditorExtension(typeof(RazorEditorFactory), RazorLSPContentTypeDefinition.CSHTMLFileExtension, 51, NameResourceID = 101)]
16+
[ProvideEditorExtension(typeof(RazorEditorFactory), RazorLSPContentTypeDefinition.RazorFileExtension, 51, NameResourceID = 101)]
1717
[ProvideEditorFactory(typeof(RazorEditorFactory), 101)]
1818
[PackageRegistration(UseManagedResourcesOnly = true)]
1919
[AboutDialogInfo(PackageGuidString, "ASP.NET Core Razor Language Services", "#110", "#112", IconResourceID = "#400")]

0 commit comments

Comments
 (0)