提交 bd69fb6e 编写于 作者: K Kevin Halverson

Fix up completion for #load...

Move "LoadCommandCompletionProvider" to the right layer and rename to "LoadDirectiveCompletionProvider".
上级 28be3cad
......@@ -99,6 +99,8 @@
<Compile Include="Completion\CompletionProviders\XmlDocCommentCompletion\XmlDocCommentCompletionItemRules.cs" />
<Compile Include="Completion\CompletionProviders\XmlDocCommentCompletion\XmlDocCommentCompletionProvider.cs" />
<Compile Include="Completion\FileSystem\GlobalAssemblyCacheCompletionHelper.cs" />
<Compile Include="Completion\FileSystem\LoadDirectiveCompletionProvider.cs" />
<Compile Include="Completion\FileSystem\LoadDirectiveCompletionProvider.ItemRules.cs" />
<Compile Include="Completion\FileSystem\ReferenceDirectiveCompletionProvider.cs" />
<Compile Include="Completion\FileSystem\ReferenceDirectiveCompletionProvider.ItemRules.cs" />
<Compile Include="ContentType\ContentTypeDefinitions.cs" />
......@@ -268,4 +270,4 @@
<Import Project="..\..\..\build\Targets\VSL.Imports.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
</ImportGroup>
</Project>
</Project>
\ No newline at end of file
......@@ -5,9 +5,9 @@
using Microsoft.CodeAnalysis.Options;
using Microsoft.CodeAnalysis.Text;
namespace Microsoft.CodeAnalysis.Editor.Implementation.Interactive
namespace Microsoft.CodeAnalysis.Editor.CSharp.Completion.FileSystem
{
internal partial class LoadCommandCompletionProvider
internal partial class LoadDirectiveCompletionProvider
{
private class ItemRules : CompletionItemRules
{
......
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Collections.Immutable;
using System.Text.RegularExpressions;
......@@ -6,18 +6,13 @@
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.Completion;
using Microsoft.CodeAnalysis.Editor.Implementation.IntelliSense.Completion.FileSystem;
using Microsoft.CodeAnalysis.Interactive;
using Microsoft.CodeAnalysis.Options;
using Microsoft.CodeAnalysis.Text;
// This is in completely the wrong place. It needs to be put in a proper place once we create a real
// interactive services assembly.
namespace Microsoft.CodeAnalysis.Editor.Implementation.Interactive
namespace Microsoft.CodeAnalysis.Editor.CSharp.Completion.FileSystem
{
// TODO(cyrusn): Use a predefined name here.
[ExportCompletionProvider("LoadCommandCompletionProvider", InteractiveLanguageNames.InteractiveCommand)]
internal partial class LoadCommandCompletionProvider : CompletionListProvider
[ExportCompletionProvider("LoadDirectiveCompletionProvider", LanguageNames.CSharp)]
internal partial class LoadDirectiveCompletionProvider : CompletionListProvider
{
private const string NetworkPath = "\\\\";
private static readonly Regex s_directiveRegex = new Regex(@"#load\s+(""[^""]*""?)", RegexOptions.Compiled);
......
......@@ -4,8 +4,8 @@
using System.IO;
using System.Linq;
using Microsoft.CodeAnalysis.Completion;
using Microsoft.CodeAnalysis.Editor.CSharp.Completion.FileSystem;
using Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.Completion.CompletionProviders;
using Microsoft.CodeAnalysis.Editor.Implementation.Interactive;
using Roslyn.Test.Utilities;
using Xunit;
......@@ -15,7 +15,7 @@ public class LoadDirectiveCompletionProviderTests : AbstractCSharpCompletionProv
{
internal override CompletionListProvider CreateCompletionProvider()
{
return new LoadCommandCompletionProvider();
return new LoadDirectiveCompletionProvider();
}
protected override bool CompareItems(string actualItem, string expectedItem)
......
......@@ -140,8 +140,6 @@
<Compile Include="Implementation\Interactive\InteractiveGlobalUndoServiceFactory.cs" />
<Compile Include="Implementation\Interactive\InteractiveTextUndoHistoryWorkspaceServiceFactory.cs" />
<Compile Include="Implementation\Interactive\InteractiveWorkspace.cs" />
<Compile Include="Implementation\Interactive\LoadCommandCompletionProvider.ItemRules.cs" />
<Compile Include="Implementation\Interactive\LoadCommandCompletionProvider.cs" />
<Compile Include="Implementation\Interactive\InteractiveDocumentSupportsSuggestionService.cs" />
</ItemGroup>
<ItemGroup>
......@@ -151,4 +149,4 @@
<Import Project="..\..\..\..\build\Targets\VSL.Imports.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
</ImportGroup>
</Project>
</Project>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册