-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move DocumentMappingService down to Workspaces #10068
Move DocumentMappingService down to Workspaces #10068
Conversation
...Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Implementation/ImplementationEndpoint.cs
Outdated
Show resolved
Hide resolved
src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/RazorRequestContextFactory.cs
Outdated
Show resolved
Hide resolved
...crosoft.CodeAnalysis.Razor.Workspaces/DocumentMapping/AbstractRazorDocumentMappingService.cs
Outdated
Show resolved
Hide resolved
src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/ProjectSystem/DocumentContext.cs
Show resolved
Hide resolved
@@ -4,7 +4,7 @@ | |||
using System; | |||
using Microsoft.VisualStudio.LanguageServer.Protocol; | |||
|
|||
namespace Microsoft.AspNetCore.Razor.LanguageServer; | |||
namespace Microsoft.CodeAnalysis.Razor.Workspaces.ProjectSystem; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider changing this namespace to Microsoft.CodeAnalysis.Razor.ProjectSystem
to match other types in this folder. I've been doing that with all of them as I've made changes. Same feedback for the other types moved to this namespace.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like I also violated that on a previous PR so I'll fix them all up. I'll also change Microsoft.CodeAnalysis.Razor.Workspaces.DocumentMapping
to Microsoft.CodeAnalysis.Razor.DocumentMapping
to match, and update everything. At least there is an easy code action for these sorts of updates :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least there is an easy code action for these sorts of updates
For sure! Move to Namespace is a huge time saver. I feel less bad recommending changes like these knowing that's there.
src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Semantic/SemanticTokensTest.cs
Outdated
Show resolved
Hide resolved
@@ -17,6 +17,7 @@ | |||
using Microsoft.AspNetCore.Razor.PooledObjects; | |||
using Microsoft.VisualStudio.LanguageServer.Protocol; | |||
using Newtonsoft.Json.Linq; | |||
using Microsoft.CodeAnalysis.Razor.ProjectSystem; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: sort usings
@@ -20,6 +20,7 @@ | |||
using Microsoft.CodeAnalysis.Razor; | |||
using Microsoft.VisualStudio.LanguageServer.Protocol; | |||
using Newtonsoft.Json.Linq; | |||
using Microsoft.CodeAnalysis.Razor.ProjectSystem; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: sort usings
@@ -14,6 +14,7 @@ | |||
using Microsoft.Extensions.Logging; | |||
using Microsoft.VisualStudio.LanguageServer.Protocol; | |||
using Microsoft.CodeAnalysis.Razor.Workspaces.Protocol; | |||
using Microsoft.CodeAnalysis.Razor.DocumentMapping; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: sort usings
@@ -11,6 +11,7 @@ | |||
using Microsoft.Extensions.Logging; | |||
using Microsoft.VisualStudio.LanguageServer.Protocol; | |||
using Microsoft.CodeAnalysis.Razor.Workspaces.Protocol; | |||
using Microsoft.CodeAnalysis.Razor.DocumentMapping; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: sort usings
@@ -13,6 +13,7 @@ | |||
using Microsoft.Extensions.Logging; | |||
using Microsoft.VisualStudio.LanguageServer.Protocol; | |||
using Microsoft.CodeAnalysis.Razor.Workspaces.Protocol; | |||
using Microsoft.CodeAnalysis.Razor.DocumentMapping; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: sort usings
@@ -19,6 +19,7 @@ | |||
using Microsoft.Extensions.Logging; | |||
using Microsoft.VisualStudio.LanguageServer.Protocol; | |||
using Microsoft.CodeAnalysis.Razor.Workspaces.Protocol; | |||
using Microsoft.CodeAnalysis.Razor.DocumentMapping; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: sort usings
using Microsoft.AspNetCore.Razor.LanguageServer.Cohost; | ||
using Microsoft.AspNetCore.Razor.LanguageServer.EndpointContracts; | ||
using Microsoft.CodeAnalysis.ExternalAccess.Razor.Cohost; | ||
using Microsoft.CodeAnalysis.Razor.ProjectSystem; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: sort usings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These usings are already sorted 😛
For the rest, I opened #10080
Part of #9519
In order to use the document mapping service in OOP we need it to be in Workspaces. In order to move the document mapping service to Workspaces we also need a couple of DocumentContext things down there too.
The changes in this PR are entirely mechanical, but GitHub doesn't know that
AbstractRazorDocumentMappingService
is a move ofRazorDocumentMappingService
, because the latter still exists. In future there will be another implementation of it in Remote.Razor too.