提交 0b04c6be 编写于 作者: C CyrusNajmabadi 提交者: GitHub

Merge pull request #18851 from CyrusNajmabadi/moveRQNameDown

Move the implementation of RQNames down to hte Feature-layer.
......@@ -173,6 +173,48 @@
<Compile Include="Navigation\NavigableItemFactory.SymbolLocationNavigableItem.cs" />
<Compile Include="AddImport\CodeActions\PackageReference.ParentCodeAction.cs" />
<Compile Include="Remote\RemoteArguments.cs" />
<Compile Include="RQName\Nodes\ResolvedRQNode.cs" />
<Compile Include="RQName\Nodes\RQArrayOrPointerType.cs" />
<Compile Include="RQName\Nodes\RQArrayType.cs" />
<Compile Include="RQName\Nodes\RQConstructedType.cs" />
<Compile Include="RQName\Nodes\RQConstructor.cs" />
<Compile Include="RQName\Nodes\RQErrorType.cs" />
<Compile Include="RQName\Nodes\RQEvent.cs" />
<Compile Include="RQName\Nodes\RQExplicitInterfaceMemberName.cs" />
<Compile Include="RQName\Nodes\RQIndexer.cs" />
<Compile Include="RQName\Nodes\RQMember.cs" />
<Compile Include="RQName\Nodes\RQMemberParameterIndex.cs" />
<Compile Include="RQName\Nodes\RQMemberParameterIndexFromPartialImplementation.cs" />
<Compile Include="RQName\Nodes\RQMemberParameterIndexFromPartialSignature.cs" />
<Compile Include="RQName\Nodes\RQMemberVariable.cs" />
<Compile Include="RQName\Nodes\RQMethod.cs" />
<Compile Include="RQName\Nodes\RQMethodBase.cs" />
<Compile Include="RQName\Nodes\RQMethodOrProperty.cs" />
<Compile Include="RQName\Nodes\RQMethodPropertyOrEvent.cs" />
<Compile Include="RQName\Nodes\RQMethodPropertyOrEventName.cs" />
<Compile Include="RQName\Nodes\RQNamespace.cs" />
<Compile Include="RQName\Nodes\RQNode.cs" />
<Compile Include="RQName\Nodes\RQNormalParameter.cs" />
<Compile Include="RQName\Nodes\RQNullType.cs" />
<Compile Include="RQName\Nodes\RQOrdinaryMethodPropertyOrEventName.cs" />
<Compile Include="RQName\Nodes\RQOutParameter.cs" />
<Compile Include="RQName\Nodes\RQParameter.cs" />
<Compile Include="RQName\Nodes\RQPointerType.cs" />
<Compile Include="RQName\Nodes\RQProperty.cs" />
<Compile Include="RQName\Nodes\RQPropertyBase.cs" />
<Compile Include="RQName\Nodes\RQRefParameter.cs" />
<Compile Include="RQName\Nodes\RQType.cs" />
<Compile Include="RQName\Nodes\RQTypeOrNamespace.cs" />
<Compile Include="RQName\Nodes\RQTypeVariableType.cs" />
<Compile Include="RQName\Nodes\RQUnconstructedType.cs" />
<Compile Include="RQName\Nodes\RQVoidType.cs" />
<Compile Include="RQName\ParenthesesTreeWriter.cs" />
<Compile Include="RQName\RQNameInternal.cs" />
<Compile Include="RQName\RQNameStrings.cs" />
<Compile Include="RQName\RQNodeBuilder.cs" />
<Compile Include="RQName\SimpleTree\SimpleGroupNode.cs" />
<Compile Include="RQName\SimpleTree\SimpleLeafNode.cs" />
<Compile Include="RQName\SimpleTree\SimpleTreeNode.cs" />
<Compile Include="Structure\BlockStructureOptions.cs" />
<Compile Include="AddImport\CodeActions\SymbolReference.SymbolReferenceCodeAction.cs" />
<Compile Include="TodoComments\AbstractTodoCommentService.cs" />
......
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace Microsoft.VisualStudio.LanguageServices.Implementation.RQName.Nodes
namespace Microsoft.CodeAnalysis.Features.RQName.Nodes
{
internal abstract class RQArrayOrPointerType : RQType
{
......@@ -11,4 +11,4 @@ public RQArrayOrPointerType(RQType elementType)
this.ElementType = elementType;
}
}
}
}
\ No newline at end of file
// 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 Microsoft.VisualStudio.LanguageServices.Implementation.RQName.SimpleTree;
using Microsoft.CodeAnalysis.Features.RQName.SimpleTree;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.RQName.Nodes
namespace Microsoft.CodeAnalysis.Features.RQName.Nodes
{
internal class RQArrayType : RQArrayOrPointerType
{
......@@ -20,4 +20,4 @@ public override SimpleTreeNode ToSimpleTree()
return new SimpleGroupNode(RQNameStrings.Array, rankNode, ElementType.ToSimpleTree());
}
}
}
}
\ No newline at end of file
......@@ -3,10 +3,9 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using Microsoft.VisualStudio.LanguageServices.Implementation.RQName.SimpleTree;
using Roslyn.Utilities;
using Microsoft.CodeAnalysis.Features.RQName.SimpleTree;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.RQName.Nodes
namespace Microsoft.CodeAnalysis.Features.RQName.Nodes
{
internal class RQConstructedType : RQType
{
......@@ -26,4 +25,4 @@ public override SimpleTreeNode ToSimpleTree()
return new SimpleGroupNode(RQNameStrings.AggType, this.DefiningType.ToSimpleTree(), typeParamsNode);
}
}
}
}
\ No newline at end of file
......@@ -2,7 +2,7 @@
using System.Collections.Generic;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.RQName.Nodes
namespace Microsoft.CodeAnalysis.Features.RQName.Nodes
{
internal class RQConstructor : RQMethodBase
{
......@@ -15,4 +15,4 @@ internal class RQConstructor : RQMethodBase
{
}
}
}
}
\ No newline at end of file
// 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 Microsoft.VisualStudio.LanguageServices.Implementation.RQName.SimpleTree;
using Microsoft.CodeAnalysis.Features.RQName.SimpleTree;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.RQName.Nodes
namespace Microsoft.CodeAnalysis.Features.RQName.Nodes
{
internal class RQErrorType : RQType
{
......@@ -18,4 +18,4 @@ public override SimpleTreeNode ToSimpleTree()
return new SimpleGroupNode(RQNameStrings.Error, this.Name);
}
}
}
}
\ No newline at end of file
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace Microsoft.VisualStudio.LanguageServices.Implementation.RQName.Nodes
namespace Microsoft.CodeAnalysis.Features.RQName.Nodes
{
internal class RQEvent : RQMethodPropertyOrEvent
{
public RQEvent(RQUnconstructedType containingType, RQMethodPropertyOrEventName memberName)
: base(containingType, memberName)
{ }
{
}
protected override string RQKeyword
{
get { return RQNameStrings.Event; }
}
}
}
}
\ No newline at end of file
// 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;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.VisualStudio.LanguageServices.Implementation.RQName.SimpleTree;
using Microsoft.CodeAnalysis.Features.RQName.SimpleTree;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.RQName.Nodes
namespace Microsoft.CodeAnalysis.Features.RQName.Nodes
{
internal class RQExplicitInterfaceMemberName : RQMethodPropertyOrEventName
{
......@@ -30,4 +25,4 @@ public override SimpleGroupNode ToSimpleTree()
return new SimpleGroupNode(RQNameStrings.IntfExplName, InterfaceType.ToSimpleTree(), Name.ToSimpleTree());
}
}
}
}
\ No newline at end of file
......@@ -2,7 +2,7 @@
using System.Collections.Generic;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.RQName.Nodes
namespace Microsoft.CodeAnalysis.Features.RQName.Nodes
{
internal class RQIndexer : RQPropertyBase
{
......@@ -12,6 +12,7 @@ internal class RQIndexer : RQPropertyBase
int typeParameterCount,
IList<RQParameter> parameters)
: base(containingType, memberName, typeParameterCount, parameters)
{ }
{
}
}
}
}
\ No newline at end of file
// 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.Generic;
using Microsoft.CodeAnalysis;
using Microsoft.VisualStudio.LanguageServices.Implementation.RQName.SimpleTree;
using Roslyn.Utilities;
using Microsoft.CodeAnalysis.Features.RQName.SimpleTree;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.RQName.Nodes
namespace Microsoft.CodeAnalysis.Features.RQName.Nodes
{
internal abstract class RQMember : RQNode<IFieldSymbol>
{
......@@ -23,4 +21,4 @@ protected override void AppendChildren(List<SimpleTreeNode> childList)
childList.Add(this.ContainingType.ToSimpleTree());
}
}
}
}
\ No newline at end of file
// 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.Generic;
using Microsoft.CodeAnalysis;
using Microsoft.VisualStudio.LanguageServices.Implementation.RQName.SimpleTree;
using Roslyn.Utilities;
using Microsoft.CodeAnalysis.Features.RQName.SimpleTree;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.RQName.Nodes
namespace Microsoft.CodeAnalysis.Features.RQName.Nodes
{
internal class RQMemberParameterIndex : RQNode<IParameterSymbol>
{
......@@ -32,4 +30,4 @@ protected override void AppendChildren(List<SimpleTreeNode> childList)
childList.Add(new SimpleLeafNode(RQNameStrings.NotPartial));
}
}
}
}
\ No newline at end of file
// 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.Generic;
using Microsoft.VisualStudio.LanguageServices.Implementation.RQName.SimpleTree;
using Microsoft.CodeAnalysis.Features.RQName.SimpleTree;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.RQName.Nodes
namespace Microsoft.CodeAnalysis.Features.RQName.Nodes
{
internal class RQMemberParameterIndexFromPartialImplementation : RQMemberParameterIndex
{
......@@ -11,7 +11,8 @@ internal class RQMemberParameterIndexFromPartialImplementation : RQMemberParamet
RQMember containingMember,
int parameterIndex)
: base(containingMember, parameterIndex)
{ }
{
}
protected override void AppendChildren(List<SimpleTreeNode> childList)
{
......@@ -20,4 +21,4 @@ protected override void AppendChildren(List<SimpleTreeNode> childList)
childList.Add(new SimpleLeafNode(RQNameStrings.PartialImplementation));
}
}
}
}
\ No newline at end of file
// 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.Generic;
using Microsoft.VisualStudio.LanguageServices.Implementation.RQName.SimpleTree;
using Microsoft.CodeAnalysis.Features.RQName.SimpleTree;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.RQName.Nodes
namespace Microsoft.CodeAnalysis.Features.RQName.Nodes
{
internal class RQMemberParameterIndexFromPartialSignature : RQMemberParameterIndex
{
......@@ -11,7 +11,8 @@ internal class RQMemberParameterIndexFromPartialSignature : RQMemberParameterInd
RQMember containingMember,
int parameterIndex)
: base(containingMember, parameterIndex)
{ }
{
}
protected override void AppendChildren(List<SimpleTreeNode> childList)
{
......@@ -20,4 +21,4 @@ protected override void AppendChildren(List<SimpleTreeNode> childList)
childList.Add(new SimpleLeafNode(RQNameStrings.PartialSignature));
}
}
}
}
\ No newline at end of file
// 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.Generic;
using Microsoft.VisualStudio.LanguageServices.Implementation.RQName.SimpleTree;
using Microsoft.CodeAnalysis.Features.RQName.SimpleTree;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.RQName.Nodes
namespace Microsoft.CodeAnalysis.Features.RQName.Nodes
{
internal class RQMemberVariable : RQMember
{
......@@ -31,4 +31,4 @@ protected override void AppendChildren(List<SimpleTreeNode> childList)
childList.Add(new SimpleGroupNode(RQNameStrings.MembVarName, this.Name));
}
}
}
}
\ No newline at end of file
......@@ -2,7 +2,7 @@
using System.Collections.Generic;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.RQName.Nodes
namespace Microsoft.CodeAnalysis.Features.RQName.Nodes
{
internal class RQMethod : RQMethodBase
{
......@@ -12,6 +12,7 @@ internal class RQMethod : RQMethodBase
int typeParameterCount,
IList<RQParameter> parameters)
: base(containingType, memberName, typeParameterCount, parameters)
{ }
{
}
}
}
}
\ No newline at end of file
......@@ -2,7 +2,7 @@
using System.Collections.Generic;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.RQName.Nodes
namespace Microsoft.CodeAnalysis.Features.RQName.Nodes
{
internal abstract class RQMethodBase : RQMethodOrProperty
{
......@@ -12,11 +12,12 @@ internal abstract class RQMethodBase : RQMethodOrProperty
int typeParameterCount,
IList<RQParameter> parameters)
: base(containingType, memberName, typeParameterCount, parameters)
{ }
{
}
protected override string RQKeyword
{
get { return RQNameStrings.Meth; }
}
}
}
}
\ No newline at end of file
......@@ -3,10 +3,9 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using Microsoft.VisualStudio.LanguageServices.Implementation.RQName.SimpleTree;
using Roslyn.Utilities;
using Microsoft.CodeAnalysis.Features.RQName.SimpleTree;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.RQName.Nodes
namespace Microsoft.CodeAnalysis.Features.RQName.Nodes
{
internal abstract class RQMethodOrProperty : RQMethodPropertyOrEvent
{
......@@ -32,4 +31,4 @@ protected override void AppendChildren(List<SimpleTreeNode> childList)
childList.Add(new SimpleGroupNode(RQNameStrings.Params, paramNodes));
}
}
}
}
\ No newline at end of file
// 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.Generic;
using Microsoft.VisualStudio.LanguageServices.Implementation.RQName.SimpleTree;
using Microsoft.CodeAnalysis.Features.RQName.SimpleTree;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.RQName.Nodes
namespace Microsoft.CodeAnalysis.Features.RQName.Nodes
{
internal abstract class RQMethodPropertyOrEvent : RQMember
{
......@@ -26,4 +26,4 @@ protected override void AppendChildren(List<SimpleTreeNode> childList)
childList.Add(this.RqMemberName.ToSimpleTree());
}
}
}
}
\ No newline at end of file
// 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 Microsoft.VisualStudio.LanguageServices.Implementation.RQName.SimpleTree;
using Microsoft.CodeAnalysis.Features.RQName.SimpleTree;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.RQName.Nodes
namespace Microsoft.CodeAnalysis.Features.RQName.Nodes
{
internal abstract class RQMethodPropertyOrEventName
{
......@@ -17,4 +17,4 @@ internal abstract class RQMethodPropertyOrEventName
public abstract SimpleGroupNode ToSimpleTree();
}
}
}
\ No newline at end of file
// 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.Generic;
using Microsoft.CodeAnalysis;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.RQName.Nodes
namespace Microsoft.CodeAnalysis.Features.RQName.Nodes
{
internal class RQNamespace : RQTypeOrNamespace<INamespaceSymbol>
{
......@@ -14,4 +13,4 @@ protected override string RQKeyword
get { return RQNameStrings.Namespace; }
}
}
}
}
\ No newline at end of file
// 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.Generic;
using Microsoft.VisualStudio.LanguageServices.Implementation.RQName.SimpleTree;
using Microsoft.CodeAnalysis.Features.RQName.SimpleTree;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.RQName.Nodes
namespace Microsoft.CodeAnalysis.Features.RQName.Nodes
{
// an unresolved but parsed representation of an RQ Name
internal abstract class UnresolvedRQNode
......@@ -19,4 +19,4 @@ public SimpleGroupNode ToSimpleTree()
return new SimpleGroupNode(this.RQKeyword, childList);
}
}
}
}
\ No newline at end of file
// 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;
using Microsoft.VisualStudio.LanguageServices.Implementation.RQName.SimpleTree;
using Microsoft.CodeAnalysis.Features.RQName.SimpleTree;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.RQName.Nodes
namespace Microsoft.CodeAnalysis.Features.RQName.Nodes
{
internal class RQNormalParameter : RQParameter
{
......@@ -14,4 +13,4 @@ public override SimpleTreeNode CreateSimpleTreeForType()
return Type.ToSimpleTree();
}
}
}
}
\ No newline at end of file
// 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 Microsoft.VisualStudio.LanguageServices.Implementation.RQName.SimpleTree;
using Microsoft.CodeAnalysis.Features.RQName.SimpleTree;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.RQName.Nodes
namespace Microsoft.CodeAnalysis.Features.RQName.Nodes
{
internal class RQNullType : RQType
{
......@@ -14,4 +14,4 @@ public override SimpleTreeNode ToSimpleTree()
return new SimpleLeafNode(RQNameStrings.Null);
}
}
}
}
\ No newline at end of file
// 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 Microsoft.VisualStudio.LanguageServices.Implementation.RQName.SimpleTree;
using Microsoft.CodeAnalysis.Features.RQName.SimpleTree;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.RQName.Nodes
namespace Microsoft.CodeAnalysis.Features.RQName.Nodes
{
internal class RQOrdinaryMethodPropertyOrEventName : RQMethodPropertyOrEventName
{
......@@ -58,4 +58,4 @@ public override SimpleGroupNode ToSimpleTree()
return new SimpleGroupNode(_constructType, this.Name);
}
}
}
}
\ No newline at end of file
// 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;
using Microsoft.VisualStudio.LanguageServices.Implementation.RQName.SimpleTree;
using Microsoft.CodeAnalysis.Features.RQName.SimpleTree;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.RQName.Nodes
namespace Microsoft.CodeAnalysis.Features.RQName.Nodes
{
internal class RQOutParameter : RQParameter
{
......@@ -14,4 +13,4 @@ public override SimpleTreeNode CreateSimpleTreeForType()
return new SimpleGroupNode(RQNameStrings.ParamMod, new SimpleLeafNode(RQNameStrings.Out), Type.ToSimpleTree());
}
}
}
}
\ No newline at end of file
// 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 Microsoft.VisualStudio.LanguageServices.Implementation.RQName.SimpleTree;
using Microsoft.CodeAnalysis.Features.RQName.SimpleTree;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.RQName.Nodes
namespace Microsoft.CodeAnalysis.Features.RQName.Nodes
{
internal abstract class RQParameter
{
......@@ -20,4 +20,4 @@ public SimpleTreeNode ToSimpleTree()
public abstract SimpleTreeNode CreateSimpleTreeForType();
}
}
}
\ No newline at end of file
// 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 Microsoft.VisualStudio.LanguageServices.Implementation.RQName.SimpleTree;
using Microsoft.CodeAnalysis.Features.RQName.SimpleTree;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.RQName.Nodes
namespace Microsoft.CodeAnalysis.Features.RQName.Nodes
{
internal class RQPointerType : RQArrayOrPointerType
{
......@@ -13,4 +13,4 @@ public override SimpleTreeNode ToSimpleTree()
return new SimpleGroupNode(RQNameStrings.Pointer, ElementType.ToSimpleTree());
}
}
}
}
\ No newline at end of file
......@@ -2,7 +2,7 @@
using System.Collections.Generic;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.RQName.Nodes
namespace Microsoft.CodeAnalysis.Features.RQName.Nodes
{
internal class RQProperty : RQPropertyBase
{
......@@ -14,4 +14,4 @@ internal class RQProperty : RQPropertyBase
: base(containingType, memberName, typeParameterCount, parameters)
{ }
}
}
}
\ No newline at end of file
......@@ -2,7 +2,7 @@
using System.Collections.Generic;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.RQName.Nodes
namespace Microsoft.CodeAnalysis.Features.RQName.Nodes
{
internal abstract class RQPropertyBase : RQMethodOrProperty
{
......@@ -19,4 +19,4 @@ protected override string RQKeyword
get { return RQNameStrings.Prop; }
}
}
}
}
\ No newline at end of file
// 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;
using Microsoft.VisualStudio.LanguageServices.Implementation.RQName.SimpleTree;
using Microsoft.CodeAnalysis.Features.RQName.SimpleTree;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.RQName.Nodes
namespace Microsoft.CodeAnalysis.Features.RQName.Nodes
{
internal class RQRefParameter : RQParameter
{
......@@ -14,4 +13,4 @@ public override SimpleTreeNode CreateSimpleTreeForType()
return new SimpleGroupNode(RQNameStrings.ParamMod, new SimpleLeafNode(RQNameStrings.Ref), Type.ToSimpleTree());
}
}
}
}
\ No newline at end of file
// 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;
using Microsoft.VisualStudio.LanguageServices.Implementation.RQName.SimpleTree;
using Microsoft.CodeAnalysis.Features.RQName.SimpleTree;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.RQName.Nodes
namespace Microsoft.CodeAnalysis.Features.RQName.Nodes
{
internal abstract class RQType
{
......@@ -13,4 +13,4 @@ internal abstract class RQType
public abstract SimpleTreeNode ToSimpleTree();
}
}
}
\ No newline at end of file
......@@ -3,11 +3,9 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using Microsoft.CodeAnalysis;
using Microsoft.VisualStudio.LanguageServices.Implementation.RQName.SimpleTree;
using Roslyn.Utilities;
using Microsoft.CodeAnalysis.Features.RQName.SimpleTree;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.RQName.Nodes
namespace Microsoft.CodeAnalysis.Features.RQName.Nodes
{
internal abstract class RQTypeOrNamespace<ResolvedType> : RQNode<ResolvedType>
{
......@@ -29,4 +27,4 @@ protected override void AppendChildren(List<SimpleTreeNode> childList)
childList.AddRange(NamespaceNames.Select(name => (SimpleTreeNode)new SimpleGroupNode(RQNameStrings.NsName, name)));
}
}
}
}
\ No newline at end of file
// 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 Microsoft.VisualStudio.LanguageServices.Implementation.RQName.SimpleTree;
using Microsoft.CodeAnalysis.Features.RQName.SimpleTree;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.RQName.Nodes
namespace Microsoft.CodeAnalysis.Features.RQName.Nodes
{
internal class RQTypeVariableType : RQType
{
......@@ -18,4 +18,4 @@ public override SimpleTreeNode ToSimpleTree()
return new SimpleGroupNode(RQNameStrings.TyVar, this.Name);
}
}
}
}
\ No newline at end of file
......@@ -3,11 +3,9 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using Microsoft.CodeAnalysis;
using Microsoft.VisualStudio.LanguageServices.Implementation.RQName.SimpleTree;
using Roslyn.Utilities;
using Microsoft.CodeAnalysis.Features.RQName.SimpleTree;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.RQName.Nodes
namespace Microsoft.CodeAnalysis.Features.RQName.Nodes
{
internal class RQUnconstructedType : RQTypeOrNamespace<ITypeSymbol>
{
......@@ -47,4 +45,4 @@ public RQUnconstructedTypeInfo(string typeName, int typeVariableCount)
this.TypeVariableCount = typeVariableCount;
}
}
}
}
\ No newline at end of file
// 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 Microsoft.VisualStudio.LanguageServices.Implementation.RQName.SimpleTree;
using Microsoft.CodeAnalysis.Features.RQName.SimpleTree;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.RQName.Nodes
namespace Microsoft.CodeAnalysis.Features.RQName.Nodes
{
internal class RQVoidType : RQType
{
......@@ -14,4 +14,4 @@ public override SimpleTreeNode ToSimpleTree()
return new SimpleLeafNode(RQNameStrings.Void);
}
}
}
}
\ No newline at end of file
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace Microsoft.VisualStudio.LanguageServices.Implementation.RQName.Nodes
namespace Microsoft.CodeAnalysis.Features.RQName.Nodes
{
internal abstract class RQNode<ResolvedType> : UnresolvedRQNode
{
}
}
}
\ No newline at end of file
// 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;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.VisualStudio.LanguageServices.Implementation.RQName.SimpleTree;
using Microsoft.CodeAnalysis.Features.RQName.SimpleTree;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.RQName
namespace Microsoft.CodeAnalysis.Features.RQName
{
internal static class ParenthesesTreeWriter
{
public static string ToParenthesesFormat(SimpleTreeNode tree)
{
StringBuilder sb = new StringBuilder();
if (tree == null)
{
return null;
}
var sb = new StringBuilder();
WriteNode(tree, sb);
return sb.ToString();
}
......@@ -38,4 +39,4 @@ private static void WriteNode(SimpleTreeNode node, StringBuilder sb)
}
}
}
}
}
\ No newline at end of file
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace Microsoft.CodeAnalysis.Features.RQName
{
/// <summary>
/// Helpers related to <see cref="RQName"/>s.
/// </summary>
internal static class RQNameInternal
{
/// <summary>
/// Returns an RQName for the given symbol, or <code>null</code>if the symbol cannot be represented by an RQName.
/// </summary>
/// <param name="symbol">The symbol to build an RQName for.</param>
public static string From(ISymbol symbol)
{
var node = RQNodeBuilder.Build(symbol);
return ParenthesesTreeWriter.ToParenthesesFormat(node?.ToSimpleTree());
}
}
}
\ No newline at end of file
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace Microsoft.VisualStudio.LanguageServices.Implementation.RQName
namespace Microsoft.CodeAnalysis.Features.RQName
{
internal sealed class RQNameStrings
{
......@@ -43,4 +43,4 @@ internal sealed class RQNameStrings
internal const string SpecialDestructorName = "Finalize";
internal const string SpecialStaticConstructorName = ".cctor";
}
}
}
\ No newline at end of file
// 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;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using Microsoft.CodeAnalysis;
using Microsoft.VisualStudio.LanguageServices.Implementation.RQName.Nodes;
using Microsoft.CodeAnalysis.Features.RQName.Nodes;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.RQName
namespace Microsoft.CodeAnalysis.Features.RQName
{
internal static class RQNodeBuilder
{
......@@ -312,4 +311,4 @@ private static RQType BuildType(ITypeSymbol symbol)
}
}
}
}
}
\ No newline at end of file
// 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;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.RQName.SimpleTree
namespace Microsoft.CodeAnalysis.Features.RQName.SimpleTree
{
internal class SimpleGroupNode : SimpleTreeNode
{
......@@ -27,4 +24,4 @@ public SimpleGroupNode(string text, IList<SimpleTreeNode> children) : base(text)
public int Count { get { return Children.Count; } }
}
}
}
\ No newline at end of file
// 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;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.RQName.SimpleTree
namespace Microsoft.CodeAnalysis.Features.RQName.SimpleTree
{
internal class SimpleLeafNode : SimpleTreeNode
{
public SimpleLeafNode(string text) : base(text) { }
}
}
}
\ No newline at end of file
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace Microsoft.VisualStudio.LanguageServices.Implementation.RQName.SimpleTree
namespace Microsoft.CodeAnalysis.Features.RQName.SimpleTree
{
internal abstract class SimpleTreeNode
{
......@@ -11,4 +11,4 @@ public SimpleTreeNode(string text)
this.Text = text;
}
}
}
}
\ No newline at end of file
// 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 Microsoft.CodeAnalysis;
using Microsoft.VisualStudio.LanguageServices.Implementation.RQName;
using Microsoft.CodeAnalysis.Features.RQName;
using Microsoft.VisualStudio.Shell.Interop;
namespace Microsoft.VisualStudio.LanguageServices
......@@ -19,9 +19,6 @@ public static class RQName
/// <returns>A string suitable to pass as the pszRQName argument to methods in <see cref="IVsRefactorNotify"/>
/// and <see cref="IVsSymbolicNavigationNotify"/>.</returns>
public static string From(ISymbol symbol)
{
var node = RQNodeBuilder.Build(symbol);
return (node != null) ? ParenthesesTreeWriter.ToParenthesesFormat(node.ToSimpleTree()) : null;
}
=> RQNameInternal.From(symbol);
}
}
}
\ No newline at end of file
......@@ -7,11 +7,8 @@
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Editor;
using Microsoft.CodeAnalysis.Editor.Shared.Utilities;
using Microsoft.VisualStudio;
using Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem;
using Microsoft.VisualStudio.LanguageServices.Implementation.RQName;
using Microsoft.VisualStudio.Shell.Interop;
using Roslyn.Utilities;
namespace Microsoft.VisualStudio.LanguageServices.Implementation
{
......@@ -195,4 +192,4 @@ private bool TryGetRenamingRQNameForSymbol(ISymbol symbol, out string rqname)
return hierarchyToItemIDsMap;
}
}
}
}
\ No newline at end of file
......@@ -126,6 +126,7 @@
<Compile Include="Implementation\Remote\RemoteHostClientServiceFactory.RemoteHostClientService.cs" />
<Compile Include="Implementation\Remote\RemoteHostClientServiceFactory.SolutionChecksumUpdater.cs" />
<Compile Include="Implementation\Remote\RemoteHostOptions.cs" />
<Compile Include="Implementation\RQName\RQName.cs" />
<Compile Include="Implementation\Serialization\AssemblySerializationInfoService.cs" />
<Compile Include="Implementation\TableDataSource\DiagnosticTableControlEventProcessorProvider.AggregateDiagnosticTableControlEventProcessor.cs" />
<Compile Include="Implementation\TableDataSource\Suppression\IVisualStudioDiagnosticListSuppressionStateService.cs" />
......@@ -551,48 +552,6 @@
<Compile Include="Implementation\ProjectSystem\WorkspaceBackgroundWork.cs" />
<Compile Include="Implementation\ProvideAutomationPropertiesAttribute.cs" />
<Compile Include="Implementation\VisualStudioDocumentSupportsSuggestionService.cs" />
<Compile Include="Implementation\RQName\Nodes\ResolvedRQNode.cs" />
<Compile Include="Implementation\RQName\Nodes\RQArrayOrPointerType.cs" />
<Compile Include="Implementation\RQName\Nodes\RQArrayType.cs" />
<Compile Include="Implementation\RQName\Nodes\RQConstructedType.cs" />
<Compile Include="Implementation\RQName\Nodes\RQConstructor.cs" />
<Compile Include="Implementation\RQName\Nodes\RQErrorType.cs" />
<Compile Include="Implementation\RQName\Nodes\RQEvent.cs" />
<Compile Include="Implementation\RQName\Nodes\RQExplicitInterfaceMemberName.cs" />
<Compile Include="Implementation\RQName\Nodes\RQIndexer.cs" />
<Compile Include="Implementation\RQName\Nodes\RQMember.cs" />
<Compile Include="Implementation\RQName\Nodes\RQMemberParameterIndex.cs" />
<Compile Include="Implementation\RQName\Nodes\RQMemberParameterIndexFromPartialImplementation.cs" />
<Compile Include="Implementation\RQName\Nodes\RQMemberParameterIndexFromPartialSignature.cs" />
<Compile Include="Implementation\RQName\Nodes\RQMemberVariable.cs" />
<Compile Include="Implementation\RQName\Nodes\RQMethod.cs" />
<Compile Include="Implementation\RQName\Nodes\RQMethodBase.cs" />
<Compile Include="Implementation\RQName\Nodes\RQMethodOrProperty.cs" />
<Compile Include="Implementation\RQName\Nodes\RQMethodPropertyOrEvent.cs" />
<Compile Include="Implementation\RQName\Nodes\RQMethodPropertyOrEventName.cs" />
<Compile Include="Implementation\RQName\Nodes\RQNamespace.cs" />
<Compile Include="Implementation\RQName\Nodes\RQNode.cs" />
<Compile Include="Implementation\RQName\Nodes\RQNormalParameter.cs" />
<Compile Include="Implementation\RQName\Nodes\RQNullType.cs" />
<Compile Include="Implementation\RQName\Nodes\RQOrdinaryMethodPropertyOrEventName.cs" />
<Compile Include="Implementation\RQName\Nodes\RQOutParameter.cs" />
<Compile Include="Implementation\RQName\Nodes\RQParameter.cs" />
<Compile Include="Implementation\RQName\Nodes\RQPointerType.cs" />
<Compile Include="Implementation\RQName\Nodes\RQProperty.cs" />
<Compile Include="Implementation\RQName\Nodes\RQPropertyBase.cs" />
<Compile Include="Implementation\RQName\Nodes\RQRefParameter.cs" />
<Compile Include="Implementation\RQName\Nodes\RQType.cs" />
<Compile Include="Implementation\RQName\Nodes\RQTypeOrNamespace.cs" />
<Compile Include="Implementation\RQName\Nodes\RQTypeVariableType.cs" />
<Compile Include="Implementation\RQName\Nodes\RQUnconstructedType.cs" />
<Compile Include="Implementation\RQName\Nodes\RQVoidType.cs" />
<Compile Include="Implementation\RQName\ParenthesesTreeWriter.cs" />
<Compile Include="Implementation\RQName\RQName.cs" />
<Compile Include="Implementation\RQName\RQNameStrings.cs" />
<Compile Include="Implementation\RQName\RQNodeBuilder.cs" />
<Compile Include="Implementation\RQName\SimpleTree\SimpleGroupNode.cs" />
<Compile Include="Implementation\RQName\SimpleTree\SimpleLeafNode.cs" />
<Compile Include="Implementation\RQName\SimpleTree\SimpleTreeNode.cs" />
<Compile Include="Implementation\SaveEventsService.cs" />
<Compile Include="Implementation\Snippets\AbstractSnippetCommandHandler.cs" />
<Compile Include="Implementation\Snippets\AbstractSnippetExpansionClient.cs" />
......
......@@ -8,7 +8,6 @@ Imports Microsoft.CodeAnalysis.Editor.UnitTests.Workspaces
Imports Microsoft.CodeAnalysis.FindSymbols
Imports Microsoft.CodeAnalysis.LanguageServices
Imports Microsoft.CodeAnalysis.Shared.Extensions
Imports Microsoft.VisualStudio.LanguageServices.Implementation.RQName
Imports Roslyn.Test.Utilities
Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.RQNameTests
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册