зеркало из https://github.com/dotnet/razor.git
Don't show misc files project in hover info (#10503)
This commit is contained in:
Коммит
6b37ec2e61
|
@ -17,6 +17,11 @@ internal sealed class MiscFilesHostProject : HostProject
|
|||
{
|
||||
public static MiscFilesHostProject Instance { get; } = Create();
|
||||
|
||||
public static bool IsMiscellaneousProject(IProjectSnapshot project)
|
||||
{
|
||||
return project.Key == Instance.Key;
|
||||
}
|
||||
|
||||
public string DirectoryPath { get; }
|
||||
|
||||
private MiscFilesHostProject(
|
||||
|
|
|
@ -271,9 +271,9 @@ internal partial class RazorProjectService : IRazorProjectService, IRazorProject
|
|||
if (_projectManager.IsDocumentOpen(textDocumentPath))
|
||||
{
|
||||
_logger.LogInformation($"Moving document '{textDocumentPath}' from project '{projectSnapshot.Key}' to misc files because it is open.");
|
||||
var miscellaneousProject = _projectManager.GetMiscellaneousProject();
|
||||
if (projectSnapshot != miscellaneousProject)
|
||||
if (!MiscFilesHostProject.IsMiscellaneousProject(projectSnapshot))
|
||||
{
|
||||
var miscellaneousProject = _projectManager.GetMiscellaneousProject();
|
||||
MoveDocument(updater, textDocumentPath, fromProject: projectSnapshot, toProject: miscellaneousProject);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,6 +36,11 @@ internal abstract class TagHelperTooltipFactoryBase(IProjectSnapshotManager proj
|
|||
|
||||
foreach (var project in projectSnapshots)
|
||||
{
|
||||
if (MiscFilesHostProject.IsMiscellaneousProject(project))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var found = false;
|
||||
var tagHelpers = await project.GetTagHelpersAsync(cancellationToken).ConfigureAwait(false);
|
||||
foreach (var tagHelper in tagHelpers)
|
||||
|
|
Загрузка…
Ссылка в новой задаче