提交 891c85fc 编写于 作者: R Ravi Chande

Merge pull request #2413 from rchande/CrefCompletion2

Don't recommend type keywords in cref type args
...@@ -600,5 +600,16 @@ public void NotAfterAsyncAsType() ...@@ -600,5 +600,16 @@ public void NotAfterAsyncAsType()
{ {
VerifyAbsence(@"class c { async async $$ }"); VerifyAbsence(@"class c { async async $$ }");
} }
[WorkItem(1468, "https://github.com/dotnet/roslyn/issues/1468")]
[Fact, Trait(Traits.Feature, Traits.Features.KeywordRecommending)]
public void NotInCrefTypeParameter()
{
VerifyAbsence(@"
using System;
/// <see cref=""List{$$}"" />
class C { }
");
}
} }
} }
...@@ -600,5 +600,16 @@ public void NotAfterAsyncAsType() ...@@ -600,5 +600,16 @@ public void NotAfterAsyncAsType()
{ {
VerifyAbsence(@"class c { async async $$ }"); VerifyAbsence(@"class c { async async $$ }");
} }
[WorkItem(1468, "https://github.com/dotnet/roslyn/issues/1468")]
[Fact, Trait(Traits.Feature, Traits.Features.KeywordRecommending)]
public void NotInCrefTypeParameter()
{
VerifyAbsence(@"
using System;
/// <see cref=""List{$$}"" />
class C { }
");
}
} }
} }
...@@ -652,5 +652,16 @@ static void Main(string[] args) ...@@ -652,5 +652,16 @@ static void Main(string[] args)
"; ";
VerifyKeyword(markup); VerifyKeyword(markup);
} }
[WorkItem(1468, "https://github.com/dotnet/roslyn/issues/1468")]
[Fact, Trait(Traits.Feature, Traits.Features.KeywordRecommending)]
public void NotInCrefTypeParameter()
{
VerifyAbsence(@"
using System;
/// <see cref=""List{$$}"" />
class C { }
");
}
} }
} }
...@@ -601,5 +601,16 @@ public void NotAfterAsyncAsType() ...@@ -601,5 +601,16 @@ public void NotAfterAsyncAsType()
{ {
VerifyAbsence(@"class c { async async $$ }"); VerifyAbsence(@"class c { async async $$ }");
} }
[WorkItem(1468, "https://github.com/dotnet/roslyn/issues/1468")]
[Fact, Trait(Traits.Feature, Traits.Features.KeywordRecommending)]
public void NotInCrefTypeParameter()
{
VerifyAbsence(@"
using System;
/// <see cref=""List{$$}"" />
class C { }
");
}
} }
} }
...@@ -600,5 +600,16 @@ public void NotAfterAsyncAsType() ...@@ -600,5 +600,16 @@ public void NotAfterAsyncAsType()
{ {
VerifyAbsence(@"class c { async async $$ }"); VerifyAbsence(@"class c { async async $$ }");
} }
[WorkItem(1468, "https://github.com/dotnet/roslyn/issues/1468")]
[Fact, Trait(Traits.Feature, Traits.Features.KeywordRecommending)]
public void NotInCrefTypeParameter()
{
VerifyAbsence(@"
using System;
/// <see cref=""List{$$}"" />
class C { }
");
}
} }
} }
...@@ -573,5 +573,16 @@ public void NotAfterAsyncAsType() ...@@ -573,5 +573,16 @@ public void NotAfterAsyncAsType()
{ {
VerifyAbsence(@"class c { async async $$ }"); VerifyAbsence(@"class c { async async $$ }");
} }
[WorkItem(1468, "https://github.com/dotnet/roslyn/issues/1468")]
[Fact, Trait(Traits.Feature, Traits.Features.KeywordRecommending)]
public void NotInCrefTypeParameter()
{
VerifyAbsence(@"
using System;
/// <see cref=""List{$$}"" />
class C { }
");
}
} }
} }
...@@ -669,5 +669,16 @@ public void NotAfterAsyncAsType() ...@@ -669,5 +669,16 @@ public void NotAfterAsyncAsType()
{ {
VerifyAbsence(@"class c { async async $$ }"); VerifyAbsence(@"class c { async async $$ }");
} }
[WorkItem(1468, "https://github.com/dotnet/roslyn/issues/1468")]
[Fact, Trait(Traits.Feature, Traits.Features.KeywordRecommending)]
public void NotInCrefTypeParameter()
{
VerifyAbsence(@"
using System;
/// <see cref=""List{$$}"" />
class C { }
");
}
} }
} }
...@@ -600,5 +600,16 @@ public void NotAfterAsyncAsType() ...@@ -600,5 +600,16 @@ public void NotAfterAsyncAsType()
{ {
VerifyAbsence(@"class c { async async $$ }"); VerifyAbsence(@"class c { async async $$ }");
} }
[WorkItem(1468, "https://github.com/dotnet/roslyn/issues/1468")]
[Fact, Trait(Traits.Feature, Traits.Features.KeywordRecommending)]
public void NotInCrefTypeParameter()
{
VerifyAbsence(@"
using System;
/// <see cref=""List{$$}"" />
class C { }
");
}
} }
} }
...@@ -607,5 +607,16 @@ public void NotAfterAsyncAsType() ...@@ -607,5 +607,16 @@ public void NotAfterAsyncAsType()
{ {
VerifyAbsence(@"class c { async async $$ }"); VerifyAbsence(@"class c { async async $$ }");
} }
[WorkItem(1468, "https://github.com/dotnet/roslyn/issues/1468")]
[Fact, Trait(Traits.Feature, Traits.Features.KeywordRecommending)]
public void NotInCrefTypeParameter()
{
VerifyAbsence(@"
using System;
/// <see cref=""List{$$}"" />
class C { }
");
}
} }
} }
...@@ -600,5 +600,16 @@ public void NotAfterAsyncAsType() ...@@ -600,5 +600,16 @@ public void NotAfterAsyncAsType()
{ {
VerifyAbsence(@"class c { async async $$ }"); VerifyAbsence(@"class c { async async $$ }");
} }
[WorkItem(1468, "https://github.com/dotnet/roslyn/issues/1468")]
[Fact, Trait(Traits.Feature, Traits.Features.KeywordRecommending)]
public void NotInCrefTypeParameter()
{
VerifyAbsence(@"
using System;
/// <see cref=""List{$$}"" />
class C { }
");
}
} }
} }
...@@ -593,5 +593,16 @@ public void NotAfterAsyncAsType() ...@@ -593,5 +593,16 @@ public void NotAfterAsyncAsType()
{ {
VerifyAbsence(@"class c { async async $$ }"); VerifyAbsence(@"class c { async async $$ }");
} }
[WorkItem(1468, "https://github.com/dotnet/roslyn/issues/1468")]
[Fact, Trait(Traits.Feature, Traits.Features.KeywordRecommending)]
public void NotInCrefTypeParameter()
{
VerifyAbsence(@"
using System;
/// <see cref=""List{$$}"" />
class C { }
");
}
} }
} }
...@@ -649,5 +649,16 @@ public void NotAfterAsyncAsType() ...@@ -649,5 +649,16 @@ public void NotAfterAsyncAsType()
{ {
VerifyAbsence(@"class c { async async $$ }"); VerifyAbsence(@"class c { async async $$ }");
} }
[WorkItem(1468, "https://github.com/dotnet/roslyn/issues/1468")]
[Fact, Trait(Traits.Feature, Traits.Features.KeywordRecommending)]
public void NotInCrefTypeParameter()
{
VerifyAbsence(@"
using System;
/// <see cref=""List{$$}"" />
class C { }
");
}
} }
} }
...@@ -600,5 +600,16 @@ public void NotAfterAsyncAsType() ...@@ -600,5 +600,16 @@ public void NotAfterAsyncAsType()
{ {
VerifyAbsence(@"class c { async async $$ }"); VerifyAbsence(@"class c { async async $$ }");
} }
[WorkItem(1468, "https://github.com/dotnet/roslyn/issues/1468")]
[Fact, Trait(Traits.Feature, Traits.Features.KeywordRecommending)]
public void NotInCrefTypeParameter()
{
VerifyAbsence(@"
using System;
/// <see cref=""List{$$}"" />
class C { }
");
}
} }
} }
...@@ -600,5 +600,16 @@ public void NotAfterAsyncAsType() ...@@ -600,5 +600,16 @@ public void NotAfterAsyncAsType()
{ {
VerifyAbsence(@"class c { async async $$ }"); VerifyAbsence(@"class c { async async $$ }");
} }
[WorkItem(1468, "https://github.com/dotnet/roslyn/issues/1468")]
[Fact, Trait(Traits.Feature, Traits.Features.KeywordRecommending)]
public void NotInCrefTypeParameter()
{
VerifyAbsence(@"
using System;
/// <see cref=""List{$$}"" />
class C { }
");
}
} }
} }
...@@ -600,5 +600,16 @@ public void NotAfterAsyncAsType() ...@@ -600,5 +600,16 @@ public void NotAfterAsyncAsType()
{ {
VerifyAbsence(@"class c { async async $$ }"); VerifyAbsence(@"class c { async async $$ }");
} }
[WorkItem(1468, "https://github.com/dotnet/roslyn/issues/1468")]
[Fact, Trait(Traits.Feature, Traits.Features.KeywordRecommending)]
public void NotInCrefTypeParameter()
{
VerifyAbsence(@"
using System;
/// <see cref=""List{$$}"" />
class C { }
");
}
} }
} }
...@@ -3,7 +3,9 @@ ...@@ -3,7 +3,9 @@
using System.Threading; using System.Threading;
using Microsoft.CodeAnalysis.CSharp.Extensions; using Microsoft.CodeAnalysis.CSharp.Extensions;
using Microsoft.CodeAnalysis.CSharp.Extensions.ContextQuery; using Microsoft.CodeAnalysis.CSharp.Extensions.ContextQuery;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.CSharp.Utilities; using Microsoft.CodeAnalysis.CSharp.Utilities;
using Microsoft.CodeAnalysis.Shared.Extensions;
namespace Microsoft.CodeAnalysis.CSharp.Completion.KeywordRecommenders namespace Microsoft.CodeAnalysis.CSharp.Completion.KeywordRecommenders
{ {
...@@ -23,7 +25,7 @@ protected override bool IsValidContext(int position, CSharpSyntaxContext context ...@@ -23,7 +25,7 @@ protected override bool IsValidContext(int position, CSharpSyntaxContext context
context.IsStatementContext || context.IsStatementContext ||
context.IsGlobalStatementContext || context.IsGlobalStatementContext ||
context.IsObjectCreationTypeContext || context.IsObjectCreationTypeContext ||
context.IsGenericTypeArgumentContext || (context.IsGenericTypeArgumentContext && !context.TargetToken.Parent.HasAncestor<XmlCrefAttributeSyntax>()) ||
context.IsIsOrAsTypeContext || context.IsIsOrAsTypeContext ||
context.IsLocalVariableDeclarationContext || context.IsLocalVariableDeclarationContext ||
context.IsFixedVariableDeclarationContext || context.IsFixedVariableDeclarationContext ||
......
...@@ -3,7 +3,9 @@ ...@@ -3,7 +3,9 @@
using System.Threading; using System.Threading;
using Microsoft.CodeAnalysis.CSharp.Extensions; using Microsoft.CodeAnalysis.CSharp.Extensions;
using Microsoft.CodeAnalysis.CSharp.Extensions.ContextQuery; using Microsoft.CodeAnalysis.CSharp.Extensions.ContextQuery;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.CSharp.Utilities; using Microsoft.CodeAnalysis.CSharp.Utilities;
using Microsoft.CodeAnalysis.Shared.Extensions;
namespace Microsoft.CodeAnalysis.CSharp.Completion.KeywordRecommenders namespace Microsoft.CodeAnalysis.CSharp.Completion.KeywordRecommenders
{ {
...@@ -24,7 +26,7 @@ protected override bool IsValidContext(int position, CSharpSyntaxContext context ...@@ -24,7 +26,7 @@ protected override bool IsValidContext(int position, CSharpSyntaxContext context
context.IsStatementContext || context.IsStatementContext ||
context.IsGlobalStatementContext || context.IsGlobalStatementContext ||
context.IsObjectCreationTypeContext || context.IsObjectCreationTypeContext ||
context.IsGenericTypeArgumentContext || (context.IsGenericTypeArgumentContext && !context.TargetToken.Parent.HasAncestor<XmlCrefAttributeSyntax>()) ||
context.IsEnumBaseListContext || context.IsEnumBaseListContext ||
context.IsIsOrAsTypeContext || context.IsIsOrAsTypeContext ||
context.IsLocalVariableDeclarationContext || context.IsLocalVariableDeclarationContext ||
......
...@@ -3,7 +3,9 @@ ...@@ -3,7 +3,9 @@
using System.Threading; using System.Threading;
using Microsoft.CodeAnalysis.CSharp.Extensions; using Microsoft.CodeAnalysis.CSharp.Extensions;
using Microsoft.CodeAnalysis.CSharp.Extensions.ContextQuery; using Microsoft.CodeAnalysis.CSharp.Extensions.ContextQuery;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.CSharp.Utilities; using Microsoft.CodeAnalysis.CSharp.Utilities;
using Microsoft.CodeAnalysis.Shared.Extensions;
namespace Microsoft.CodeAnalysis.CSharp.Completion.KeywordRecommenders namespace Microsoft.CodeAnalysis.CSharp.Completion.KeywordRecommenders
{ {
...@@ -23,7 +25,7 @@ protected override bool IsValidContext(int position, CSharpSyntaxContext context ...@@ -23,7 +25,7 @@ protected override bool IsValidContext(int position, CSharpSyntaxContext context
context.IsStatementContext || context.IsStatementContext ||
context.IsGlobalStatementContext || context.IsGlobalStatementContext ||
context.IsObjectCreationTypeContext || context.IsObjectCreationTypeContext ||
context.IsGenericTypeArgumentContext || (context.IsGenericTypeArgumentContext && !context.TargetToken.Parent.HasAncestor<XmlCrefAttributeSyntax>()) ||
context.IsIsOrAsTypeContext || context.IsIsOrAsTypeContext ||
context.IsLocalVariableDeclarationContext || context.IsLocalVariableDeclarationContext ||
context.IsFixedVariableDeclarationContext || context.IsFixedVariableDeclarationContext ||
......
...@@ -3,7 +3,9 @@ ...@@ -3,7 +3,9 @@
using System.Threading; using System.Threading;
using Microsoft.CodeAnalysis.CSharp.Extensions; using Microsoft.CodeAnalysis.CSharp.Extensions;
using Microsoft.CodeAnalysis.CSharp.Extensions.ContextQuery; using Microsoft.CodeAnalysis.CSharp.Extensions.ContextQuery;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.CSharp.Utilities; using Microsoft.CodeAnalysis.CSharp.Utilities;
using Microsoft.CodeAnalysis.Shared.Extensions;
namespace Microsoft.CodeAnalysis.CSharp.Completion.KeywordRecommenders namespace Microsoft.CodeAnalysis.CSharp.Completion.KeywordRecommenders
{ {
...@@ -23,7 +25,7 @@ protected override bool IsValidContext(int position, CSharpSyntaxContext context ...@@ -23,7 +25,7 @@ protected override bool IsValidContext(int position, CSharpSyntaxContext context
context.IsStatementContext || context.IsStatementContext ||
context.IsGlobalStatementContext || context.IsGlobalStatementContext ||
context.IsObjectCreationTypeContext || context.IsObjectCreationTypeContext ||
context.IsGenericTypeArgumentContext || (context.IsGenericTypeArgumentContext && !context.TargetToken.Parent.HasAncestor<XmlCrefAttributeSyntax>()) ||
context.IsIsOrAsTypeContext || context.IsIsOrAsTypeContext ||
context.IsLocalVariableDeclarationContext || context.IsLocalVariableDeclarationContext ||
context.IsFixedVariableDeclarationContext || context.IsFixedVariableDeclarationContext ||
......
...@@ -3,7 +3,9 @@ ...@@ -3,7 +3,9 @@
using System.Threading; using System.Threading;
using Microsoft.CodeAnalysis.CSharp.Extensions; using Microsoft.CodeAnalysis.CSharp.Extensions;
using Microsoft.CodeAnalysis.CSharp.Extensions.ContextQuery; using Microsoft.CodeAnalysis.CSharp.Extensions.ContextQuery;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.CSharp.Utilities; using Microsoft.CodeAnalysis.CSharp.Utilities;
using Microsoft.CodeAnalysis.Shared.Extensions;
namespace Microsoft.CodeAnalysis.CSharp.Completion.KeywordRecommenders namespace Microsoft.CodeAnalysis.CSharp.Completion.KeywordRecommenders
{ {
...@@ -23,7 +25,7 @@ protected override bool IsValidContext(int position, CSharpSyntaxContext context ...@@ -23,7 +25,7 @@ protected override bool IsValidContext(int position, CSharpSyntaxContext context
context.IsStatementContext || context.IsStatementContext ||
context.IsGlobalStatementContext || context.IsGlobalStatementContext ||
context.IsObjectCreationTypeContext || context.IsObjectCreationTypeContext ||
context.IsGenericTypeArgumentContext || (context.IsGenericTypeArgumentContext && !context.TargetToken.Parent.HasAncestor<XmlCrefAttributeSyntax>()) ||
context.IsIsOrAsTypeContext || context.IsIsOrAsTypeContext ||
context.IsLocalVariableDeclarationContext || context.IsLocalVariableDeclarationContext ||
context.IsFixedVariableDeclarationContext || context.IsFixedVariableDeclarationContext ||
......
...@@ -3,7 +3,9 @@ ...@@ -3,7 +3,9 @@
using System.Threading; using System.Threading;
using Microsoft.CodeAnalysis.CSharp.Extensions; using Microsoft.CodeAnalysis.CSharp.Extensions;
using Microsoft.CodeAnalysis.CSharp.Extensions.ContextQuery; using Microsoft.CodeAnalysis.CSharp.Extensions.ContextQuery;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.CSharp.Utilities; using Microsoft.CodeAnalysis.CSharp.Utilities;
using Microsoft.CodeAnalysis.Shared.Extensions;
namespace Microsoft.CodeAnalysis.CSharp.Completion.KeywordRecommenders namespace Microsoft.CodeAnalysis.CSharp.Completion.KeywordRecommenders
{ {
...@@ -23,7 +25,7 @@ protected override bool IsValidContext(int position, CSharpSyntaxContext context ...@@ -23,7 +25,7 @@ protected override bool IsValidContext(int position, CSharpSyntaxContext context
context.IsStatementContext || context.IsStatementContext ||
context.IsGlobalStatementContext || context.IsGlobalStatementContext ||
context.IsObjectCreationTypeContext || context.IsObjectCreationTypeContext ||
context.IsGenericTypeArgumentContext || (context.IsGenericTypeArgumentContext && !context.TargetToken.Parent.HasAncestor<XmlCrefAttributeSyntax>()) ||
context.IsIsOrAsTypeContext || context.IsIsOrAsTypeContext ||
context.IsLocalVariableDeclarationContext || context.IsLocalVariableDeclarationContext ||
context.IsFixedVariableDeclarationContext || context.IsFixedVariableDeclarationContext ||
......
...@@ -3,7 +3,9 @@ ...@@ -3,7 +3,9 @@
using System.Threading; using System.Threading;
using Microsoft.CodeAnalysis.CSharp.Extensions; using Microsoft.CodeAnalysis.CSharp.Extensions;
using Microsoft.CodeAnalysis.CSharp.Extensions.ContextQuery; using Microsoft.CodeAnalysis.CSharp.Extensions.ContextQuery;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.CSharp.Utilities; using Microsoft.CodeAnalysis.CSharp.Utilities;
using Microsoft.CodeAnalysis.Shared.Extensions;
namespace Microsoft.CodeAnalysis.CSharp.Completion.KeywordRecommenders namespace Microsoft.CodeAnalysis.CSharp.Completion.KeywordRecommenders
{ {
...@@ -23,7 +25,7 @@ protected override bool IsValidContext(int position, CSharpSyntaxContext context ...@@ -23,7 +25,7 @@ protected override bool IsValidContext(int position, CSharpSyntaxContext context
context.IsStatementContext || context.IsStatementContext ||
context.IsGlobalStatementContext || context.IsGlobalStatementContext ||
context.IsObjectCreationTypeContext || context.IsObjectCreationTypeContext ||
context.IsGenericTypeArgumentContext || (context.IsGenericTypeArgumentContext && !context.TargetToken.Parent.HasAncestor<XmlCrefAttributeSyntax>()) ||
context.IsEnumBaseListContext || context.IsEnumBaseListContext ||
context.IsIsOrAsTypeContext || context.IsIsOrAsTypeContext ||
context.IsLocalVariableDeclarationContext || context.IsLocalVariableDeclarationContext ||
......
...@@ -3,7 +3,9 @@ ...@@ -3,7 +3,9 @@
using System.Threading; using System.Threading;
using Microsoft.CodeAnalysis.CSharp.Extensions; using Microsoft.CodeAnalysis.CSharp.Extensions;
using Microsoft.CodeAnalysis.CSharp.Extensions.ContextQuery; using Microsoft.CodeAnalysis.CSharp.Extensions.ContextQuery;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.CSharp.Utilities; using Microsoft.CodeAnalysis.CSharp.Utilities;
using Microsoft.CodeAnalysis.Shared.Extensions;
namespace Microsoft.CodeAnalysis.CSharp.Completion.KeywordRecommenders namespace Microsoft.CodeAnalysis.CSharp.Completion.KeywordRecommenders
{ {
...@@ -23,7 +25,7 @@ protected override bool IsValidContext(int position, CSharpSyntaxContext context ...@@ -23,7 +25,7 @@ protected override bool IsValidContext(int position, CSharpSyntaxContext context
context.IsStatementContext || context.IsStatementContext ||
context.IsGlobalStatementContext || context.IsGlobalStatementContext ||
context.IsObjectCreationTypeContext || context.IsObjectCreationTypeContext ||
context.IsGenericTypeArgumentContext || (context.IsGenericTypeArgumentContext && !context.TargetToken.Parent.HasAncestor<XmlCrefAttributeSyntax>()) ||
context.IsEnumBaseListContext || context.IsEnumBaseListContext ||
context.IsIsOrAsTypeContext || context.IsIsOrAsTypeContext ||
context.IsLocalVariableDeclarationContext || context.IsLocalVariableDeclarationContext ||
......
...@@ -3,7 +3,9 @@ ...@@ -3,7 +3,9 @@
using System.Threading; using System.Threading;
using Microsoft.CodeAnalysis.CSharp.Extensions; using Microsoft.CodeAnalysis.CSharp.Extensions;
using Microsoft.CodeAnalysis.CSharp.Extensions.ContextQuery; using Microsoft.CodeAnalysis.CSharp.Extensions.ContextQuery;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.CSharp.Utilities; using Microsoft.CodeAnalysis.CSharp.Utilities;
using Microsoft.CodeAnalysis.Shared.Extensions;
namespace Microsoft.CodeAnalysis.CSharp.Completion.KeywordRecommenders namespace Microsoft.CodeAnalysis.CSharp.Completion.KeywordRecommenders
{ {
...@@ -23,7 +25,7 @@ protected override bool IsValidContext(int position, CSharpSyntaxContext context ...@@ -23,7 +25,7 @@ protected override bool IsValidContext(int position, CSharpSyntaxContext context
context.IsStatementContext || context.IsStatementContext ||
context.IsGlobalStatementContext || context.IsGlobalStatementContext ||
context.IsObjectCreationTypeContext || context.IsObjectCreationTypeContext ||
context.IsGenericTypeArgumentContext || (context.IsGenericTypeArgumentContext && !context.TargetToken.Parent.HasAncestor<XmlCrefAttributeSyntax>()) ||
context.IsIsOrAsTypeContext || context.IsIsOrAsTypeContext ||
context.IsLocalVariableDeclarationContext || context.IsLocalVariableDeclarationContext ||
context.IsParameterTypeContext || context.IsParameterTypeContext ||
......
...@@ -3,7 +3,9 @@ ...@@ -3,7 +3,9 @@
using System.Threading; using System.Threading;
using Microsoft.CodeAnalysis.CSharp.Extensions; using Microsoft.CodeAnalysis.CSharp.Extensions;
using Microsoft.CodeAnalysis.CSharp.Extensions.ContextQuery; using Microsoft.CodeAnalysis.CSharp.Extensions.ContextQuery;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.CSharp.Utilities; using Microsoft.CodeAnalysis.CSharp.Utilities;
using Microsoft.CodeAnalysis.Shared.Extensions;
namespace Microsoft.CodeAnalysis.CSharp.Completion.KeywordRecommenders namespace Microsoft.CodeAnalysis.CSharp.Completion.KeywordRecommenders
{ {
...@@ -23,7 +25,7 @@ protected override bool IsValidContext(int position, CSharpSyntaxContext context ...@@ -23,7 +25,7 @@ protected override bool IsValidContext(int position, CSharpSyntaxContext context
context.IsStatementContext || context.IsStatementContext ||
context.IsGlobalStatementContext || context.IsGlobalStatementContext ||
context.IsObjectCreationTypeContext || context.IsObjectCreationTypeContext ||
context.IsGenericTypeArgumentContext || (context.IsGenericTypeArgumentContext && !context.TargetToken.Parent.HasAncestor<XmlCrefAttributeSyntax>()) ||
context.IsEnumBaseListContext || context.IsEnumBaseListContext ||
context.IsIsOrAsTypeContext || context.IsIsOrAsTypeContext ||
context.IsLocalVariableDeclarationContext || context.IsLocalVariableDeclarationContext ||
......
...@@ -3,7 +3,9 @@ ...@@ -3,7 +3,9 @@
using System.Threading; using System.Threading;
using Microsoft.CodeAnalysis.CSharp.Extensions; using Microsoft.CodeAnalysis.CSharp.Extensions;
using Microsoft.CodeAnalysis.CSharp.Extensions.ContextQuery; using Microsoft.CodeAnalysis.CSharp.Extensions.ContextQuery;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.CSharp.Utilities; using Microsoft.CodeAnalysis.CSharp.Utilities;
using Microsoft.CodeAnalysis.Shared.Extensions;
namespace Microsoft.CodeAnalysis.CSharp.Completion.KeywordRecommenders namespace Microsoft.CodeAnalysis.CSharp.Completion.KeywordRecommenders
{ {
...@@ -23,7 +25,7 @@ protected override bool IsValidContext(int position, CSharpSyntaxContext context ...@@ -23,7 +25,7 @@ protected override bool IsValidContext(int position, CSharpSyntaxContext context
context.IsStatementContext || context.IsStatementContext ||
context.IsGlobalStatementContext || context.IsGlobalStatementContext ||
context.IsObjectCreationTypeContext || context.IsObjectCreationTypeContext ||
context.IsGenericTypeArgumentContext || (context.IsGenericTypeArgumentContext && !context.TargetToken.Parent.HasAncestor<XmlCrefAttributeSyntax>()) ||
context.IsEnumBaseListContext || context.IsEnumBaseListContext ||
context.IsIsOrAsTypeContext || context.IsIsOrAsTypeContext ||
context.IsLocalVariableDeclarationContext || context.IsLocalVariableDeclarationContext ||
......
// 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.Threading; using System.Threading;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.CSharp.Extensions; using Microsoft.CodeAnalysis.CSharp.Extensions;
using Microsoft.CodeAnalysis.CSharp.Extensions.ContextQuery; using Microsoft.CodeAnalysis.CSharp.Extensions.ContextQuery;
using Microsoft.CodeAnalysis.CSharp.Utilities; using Microsoft.CodeAnalysis.CSharp.Utilities;
using Microsoft.CodeAnalysis.Shared.Extensions;
namespace Microsoft.CodeAnalysis.CSharp.Completion.KeywordRecommenders namespace Microsoft.CodeAnalysis.CSharp.Completion.KeywordRecommenders
{ {
...@@ -23,7 +25,7 @@ protected override bool IsValidContext(int position, CSharpSyntaxContext context ...@@ -23,7 +25,7 @@ protected override bool IsValidContext(int position, CSharpSyntaxContext context
context.IsStatementContext || context.IsStatementContext ||
context.IsGlobalStatementContext || context.IsGlobalStatementContext ||
context.IsObjectCreationTypeContext || context.IsObjectCreationTypeContext ||
context.IsGenericTypeArgumentContext || (context.IsGenericTypeArgumentContext && !context.TargetToken.Parent.HasAncestor<XmlCrefAttributeSyntax>()) ||
context.IsIsOrAsTypeContext || context.IsIsOrAsTypeContext ||
context.IsLocalVariableDeclarationContext || context.IsLocalVariableDeclarationContext ||
context.IsParameterTypeContext || context.IsParameterTypeContext ||
......
...@@ -3,7 +3,9 @@ ...@@ -3,7 +3,9 @@
using System.Threading; using System.Threading;
using Microsoft.CodeAnalysis.CSharp.Extensions; using Microsoft.CodeAnalysis.CSharp.Extensions;
using Microsoft.CodeAnalysis.CSharp.Extensions.ContextQuery; using Microsoft.CodeAnalysis.CSharp.Extensions.ContextQuery;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.CSharp.Utilities; using Microsoft.CodeAnalysis.CSharp.Utilities;
using Microsoft.CodeAnalysis.Shared.Extensions;
namespace Microsoft.CodeAnalysis.CSharp.Completion.KeywordRecommenders namespace Microsoft.CodeAnalysis.CSharp.Completion.KeywordRecommenders
{ {
...@@ -23,7 +25,7 @@ protected override bool IsValidContext(int position, CSharpSyntaxContext context ...@@ -23,7 +25,7 @@ protected override bool IsValidContext(int position, CSharpSyntaxContext context
context.IsStatementContext || context.IsStatementContext ||
context.IsGlobalStatementContext || context.IsGlobalStatementContext ||
context.IsObjectCreationTypeContext || context.IsObjectCreationTypeContext ||
context.IsGenericTypeArgumentContext || (context.IsGenericTypeArgumentContext && !context.TargetToken.Parent.HasAncestor<XmlCrefAttributeSyntax>()) ||
context.IsEnumBaseListContext || context.IsEnumBaseListContext ||
context.IsIsOrAsTypeContext || context.IsIsOrAsTypeContext ||
context.IsLocalVariableDeclarationContext || context.IsLocalVariableDeclarationContext ||
......
...@@ -3,7 +3,9 @@ ...@@ -3,7 +3,9 @@
using System.Threading; using System.Threading;
using Microsoft.CodeAnalysis.CSharp.Extensions; using Microsoft.CodeAnalysis.CSharp.Extensions;
using Microsoft.CodeAnalysis.CSharp.Extensions.ContextQuery; using Microsoft.CodeAnalysis.CSharp.Extensions.ContextQuery;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.CSharp.Utilities; using Microsoft.CodeAnalysis.CSharp.Utilities;
using Microsoft.CodeAnalysis.Shared.Extensions;
namespace Microsoft.CodeAnalysis.CSharp.Completion.KeywordRecommenders namespace Microsoft.CodeAnalysis.CSharp.Completion.KeywordRecommenders
{ {
...@@ -23,7 +25,7 @@ protected override bool IsValidContext(int position, CSharpSyntaxContext context ...@@ -23,7 +25,7 @@ protected override bool IsValidContext(int position, CSharpSyntaxContext context
context.IsStatementContext || context.IsStatementContext ||
context.IsGlobalStatementContext || context.IsGlobalStatementContext ||
context.IsObjectCreationTypeContext || context.IsObjectCreationTypeContext ||
context.IsGenericTypeArgumentContext || (context.IsGenericTypeArgumentContext && !context.TargetToken.Parent.HasAncestor<XmlCrefAttributeSyntax>()) ||
context.IsEnumBaseListContext || context.IsEnumBaseListContext ||
context.IsIsOrAsTypeContext || context.IsIsOrAsTypeContext ||
context.IsLocalVariableDeclarationContext || context.IsLocalVariableDeclarationContext ||
......
...@@ -3,7 +3,9 @@ ...@@ -3,7 +3,9 @@
using System.Threading; using System.Threading;
using Microsoft.CodeAnalysis.CSharp.Extensions; using Microsoft.CodeAnalysis.CSharp.Extensions;
using Microsoft.CodeAnalysis.CSharp.Extensions.ContextQuery; using Microsoft.CodeAnalysis.CSharp.Extensions.ContextQuery;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.CSharp.Utilities; using Microsoft.CodeAnalysis.CSharp.Utilities;
using Microsoft.CodeAnalysis.Shared.Extensions;
namespace Microsoft.CodeAnalysis.CSharp.Completion.KeywordRecommenders namespace Microsoft.CodeAnalysis.CSharp.Completion.KeywordRecommenders
{ {
...@@ -23,7 +25,7 @@ protected override bool IsValidContext(int position, CSharpSyntaxContext context ...@@ -23,7 +25,7 @@ protected override bool IsValidContext(int position, CSharpSyntaxContext context
context.IsStatementContext || context.IsStatementContext ||
context.IsGlobalStatementContext || context.IsGlobalStatementContext ||
context.IsObjectCreationTypeContext || context.IsObjectCreationTypeContext ||
context.IsGenericTypeArgumentContext || (context.IsGenericTypeArgumentContext && !context.TargetToken.Parent.HasAncestor<XmlCrefAttributeSyntax>()) ||
context.IsEnumBaseListContext || context.IsEnumBaseListContext ||
context.IsIsOrAsTypeContext || context.IsIsOrAsTypeContext ||
context.IsLocalVariableDeclarationContext || context.IsLocalVariableDeclarationContext ||
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册