This commit is contained in:
Noah Kim 2020-07-07 13:46:42 -04:00
Родитель 1ffe269f47
Коммит bc24b17cdd
3 изменённых файлов: 1 добавлений и 24 удалений

Просмотреть файл

@ -1,8 +1,4 @@
<<<<<<< HEAD
// Copyright (c) .NET Foundation. All rights reserved.
=======
// Copyright (c) .NET Foundation. All rights reserved.
>>>>>>> 81eac093a... Implement code action providers, resolvers, and ExtractToCodeBehind
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Collections.Generic;
@ -32,21 +28,13 @@ namespace Microsoft.AspNetCore.Razor.LanguageServer.CodeActions
return EmptyResult;
}
<<<<<<< HEAD
if (!FileKinds.IsComponent(context.Document.GetFileKind()))
=======
if (!FileKinds.IsComponent(context.CodeDocument.GetFileKind()))
>>>>>>> 81eac093a... Implement code action providers, resolvers, and ExtractToCodeBehind
{
return EmptyResult;
}
var change = new SourceChange(context.Location.AbsoluteIndex, length: 0, newText: string.Empty);
<<<<<<< HEAD
var syntaxTree = context.Document.GetSyntaxTree();
=======
var syntaxTree = context.CodeDocument.GetSyntaxTree();
>>>>>>> 81eac093a... Implement code action providers, resolvers, and ExtractToCodeBehind
if (syntaxTree?.Root is null)
{
return EmptyResult;

Просмотреть файл

@ -3,6 +3,7 @@
using System;
using Microsoft.AspNetCore.Razor.Language;
using Microsoft.CodeAnalysis.Razor.ProjectSystem;
using OmniSharp.Extensions.LanguageServer.Protocol.Models;
namespace Microsoft.AspNetCore.Razor.LanguageServer.CodeActions

Просмотреть файл

@ -47,19 +47,7 @@ namespace Microsoft.AspNetCore.Razor.LanguageServer.Semantic
var semanticRanges = TagHelperSemanticRangeVisitor.VisitAllNodes(codeDocument);
<<<<<<< HEAD
var previousResults = previousResultId is null ? null : _semanticTokensCache.Get(previousResultId);
=======
IReadOnlyList<uint> previousResults;
if(previousResultId is null)
{
previousResults = null;
}
else
{
previousResults = _semanticTokensCache.Get(previousResultId);
}
>>>>>>> 1d02aa44b... Enable semantic colorization for Visual Studio Razor LSP (#2024)
var newTokens = ConvertSemanticRangesToSemanticTokens(semanticRanges, codeDocument);
if (previousResults is null)