diff --git a/src/EditorFeatures/Core.Wpf/NavigateTo/NavigateToItemProvider.Callback.cs b/src/EditorFeatures/Core.Wpf/NavigateTo/NavigateToItemProvider.Callback.cs index 4e1c1550397f7..59d9b9a83a53f 100644 --- a/src/EditorFeatures/Core.Wpf/NavigateTo/NavigateToItemProvider.Callback.cs +++ b/src/EditorFeatures/Core.Wpf/NavigateTo/NavigateToItemProvider.Callback.cs @@ -57,7 +57,7 @@ private void ReportMatchResult(Project project, INavigateToSearchResult result) var navigateToItem = new NavigateToItem( result.Name, - GetKind(result.Kind), + result.Kind, GetNavigateToLanguage(project.Language), result.SecondarySort, result, @@ -66,46 +66,6 @@ private void ReportMatchResult(Project project, INavigateToSearchResult result) _callback.AddItem(navigateToItem); } - private static string GetKind(string kind) - => kind switch - { - CodeAnalysis.NavigateTo.NavigateToItemKind.Class - => VisualStudio.Language.NavigateTo.Interfaces.NavigateToItemKind.Class, - CodeAnalysis.NavigateTo.NavigateToItemKind.Constant - => VisualStudio.Language.NavigateTo.Interfaces.NavigateToItemKind.Constant, - CodeAnalysis.NavigateTo.NavigateToItemKind.Delegate - => VisualStudio.Language.NavigateTo.Interfaces.NavigateToItemKind.Delegate, - CodeAnalysis.NavigateTo.NavigateToItemKind.Enum - => VisualStudio.Language.NavigateTo.Interfaces.NavigateToItemKind.Enum, - CodeAnalysis.NavigateTo.NavigateToItemKind.EnumItem - => VisualStudio.Language.NavigateTo.Interfaces.NavigateToItemKind.EnumItem, - CodeAnalysis.NavigateTo.NavigateToItemKind.Event - => VisualStudio.Language.NavigateTo.Interfaces.NavigateToItemKind.Event, - CodeAnalysis.NavigateTo.NavigateToItemKind.Field - => VisualStudio.Language.NavigateTo.Interfaces.NavigateToItemKind.Field, - CodeAnalysis.NavigateTo.NavigateToItemKind.File - => VisualStudio.Language.NavigateTo.Interfaces.NavigateToItemKind.File, - CodeAnalysis.NavigateTo.NavigateToItemKind.Interface - => VisualStudio.Language.NavigateTo.Interfaces.NavigateToItemKind.Interface, - CodeAnalysis.NavigateTo.NavigateToItemKind.Line - => VisualStudio.Language.NavigateTo.Interfaces.NavigateToItemKind.Line, - CodeAnalysis.NavigateTo.NavigateToItemKind.Method - => VisualStudio.Language.NavigateTo.Interfaces.NavigateToItemKind.Method, - CodeAnalysis.NavigateTo.NavigateToItemKind.Module - => VisualStudio.Language.NavigateTo.Interfaces.NavigateToItemKind.Module, - CodeAnalysis.NavigateTo.NavigateToItemKind.OtherSymbol - => VisualStudio.Language.NavigateTo.Interfaces.NavigateToItemKind.OtherSymbol, - CodeAnalysis.NavigateTo.NavigateToItemKind.Property - => VisualStudio.Language.NavigateTo.Interfaces.NavigateToItemKind.Property, - // VisualStudio.Language.NavigateTo.Interfaces.NavigateToItemKind doesn't have a record, fall back to class. - // This should be updated whenever NavigateToItemKind has a record. - CodeAnalysis.NavigateTo.NavigateToItemKind.Record - => VisualStudio.Language.NavigateTo.Interfaces.NavigateToItemKind.Class, - CodeAnalysis.NavigateTo.NavigateToItemKind.Structure - => VisualStudio.Language.NavigateTo.Interfaces.NavigateToItemKind.Structure, - _ => throw ExceptionUtilities.UnexpectedValue(kind) - }; - private static PatternMatchKind GetPatternMatchKind(NavigateToMatchKind matchKind) => matchKind switch { diff --git a/src/Features/Core/Portable/NavigateTo/AbstractNavigateToSearchService.InProcess.cs b/src/Features/Core/Portable/NavigateTo/AbstractNavigateToSearchService.InProcess.cs index be4b472ed866d..62f63b5399cbd 100644 --- a/src/Features/Core/Portable/NavigateTo/AbstractNavigateToSearchService.InProcess.cs +++ b/src/Features/Core/Portable/NavigateTo/AbstractNavigateToSearchService.InProcess.cs @@ -287,9 +287,8 @@ private static string GetItemKind(DeclaredSymbolInfo declaredSymbolInfo) switch (declaredSymbolInfo.Kind) { case DeclaredSymbolInfoKind.Class: - return NavigateToItemKind.Class; case DeclaredSymbolInfoKind.Record: - return NavigateToItemKind.Record; + return NavigateToItemKind.Class; case DeclaredSymbolInfoKind.Constant: return NavigateToItemKind.Constant; case DeclaredSymbolInfoKind.Delegate: @@ -356,8 +355,6 @@ public DeclaredSymbolInfoKindSet(IEnumerable navigateToItemKinds) { case NavigateToItemKind.Class: lookupTable[(int)DeclaredSymbolInfoKind.Class] = true; - break; - case NavigateToItemKind.Record: lookupTable[(int)DeclaredSymbolInfoKind.Record] = true; break; case NavigateToItemKind.Constant: diff --git a/src/Features/Core/Portable/NavigateTo/AbstractNavigateToSearchService.cs b/src/Features/Core/Portable/NavigateTo/AbstractNavigateToSearchService.cs index 139d21fe1d9bf..7f77e87431778 100644 --- a/src/Features/Core/Portable/NavigateTo/AbstractNavigateToSearchService.cs +++ b/src/Features/Core/Portable/NavigateTo/AbstractNavigateToSearchService.cs @@ -16,7 +16,6 @@ internal abstract partial class AbstractNavigateToSearchService : INavigateToSea { public IImmutableSet KindsProvided { get; } = ImmutableHashSet.Create( NavigateToItemKind.Class, - NavigateToItemKind.Record, NavigateToItemKind.Constant, NavigateToItemKind.Delegate, NavigateToItemKind.Enum, diff --git a/src/Features/Core/Portable/NavigateTo/NavigateToItemKind.cs b/src/Features/Core/Portable/NavigateTo/NavigateToItemKind.cs index d2e17e5e14446..8790ecb998ca8 100644 --- a/src/Features/Core/Portable/NavigateTo/NavigateToItemKind.cs +++ b/src/Features/Core/Portable/NavigateTo/NavigateToItemKind.cs @@ -11,7 +11,6 @@ internal static class NavigateToItemKind public const string Line = nameof(Line); public const string File = nameof(File); public const string Class = nameof(Class); - public const string Record = nameof(Record); public const string Structure = nameof(Structure); public const string Interface = nameof(Interface); public const string Delegate = nameof(Delegate); diff --git a/src/Tools/ExternalAccess/FSharp/NavigateTo/FSharpNavigateToItemKind.cs b/src/Tools/ExternalAccess/FSharp/NavigateTo/FSharpNavigateToItemKind.cs index 0b5175a2cb4dc..123c14ebb4baa 100644 --- a/src/Tools/ExternalAccess/FSharp/NavigateTo/FSharpNavigateToItemKind.cs +++ b/src/Tools/ExternalAccess/FSharp/NavigateTo/FSharpNavigateToItemKind.cs @@ -13,7 +13,6 @@ internal static class FSharpNavigateToItemKind public static string Line => NavigateToItemKind.Line; public static string File = NavigateToItemKind.File; public static string Class => NavigateToItemKind.Class; - public static string Record => NavigateToItemKind.Record; public static string Structure => NavigateToItemKind.Structure; public static string Interface => NavigateToItemKind.Interface; public static string Delegate => NavigateToItemKind.Delegate; diff --git a/src/Workspaces/Core/Portable/FindSymbols/FindReferences/DependentTypeFinder_ProjectIndex.cs b/src/Workspaces/Core/Portable/FindSymbols/FindReferences/DependentTypeFinder_ProjectIndex.cs index 8141e0a29c731..af301e97b1b92 100644 --- a/src/Workspaces/Core/Portable/FindSymbols/FindReferences/DependentTypeFinder_ProjectIndex.cs +++ b/src/Workspaces/Core/Portable/FindSymbols/FindReferences/DependentTypeFinder_ProjectIndex.cs @@ -48,7 +48,7 @@ public static Task GetIndexAsync( private static async Task CreateIndexAsync(Project project, CancellationToken cancellationToken) { - var classesAndRecordsThatMayDeriveFromSystemObject = new MultiDictionary(); + var classesThatMayDeriveFromSystemObject = new MultiDictionary(); var valueTypes = new MultiDictionary(); var enums = new MultiDictionary(); var delegates = new MultiDictionary(); @@ -65,7 +65,7 @@ private static async Task CreateIndexAsync(Project project, Cancel { case DeclaredSymbolInfoKind.Class: case DeclaredSymbolInfoKind.Record: - classesAndRecordsThatMayDeriveFromSystemObject.Add(document, info); + classesThatMayDeriveFromSystemObject.Add(document, info); break; case DeclaredSymbolInfoKind.Enum: enums.Add(document, info); @@ -85,7 +85,7 @@ private static async Task CreateIndexAsync(Project project, Cancel } } - return new ProjectIndex(classesAndRecordsThatMayDeriveFromSystemObject, valueTypes, enums, delegates, namedTypes); + return new ProjectIndex(classesThatMayDeriveFromSystemObject, valueTypes, enums, delegates, namedTypes); } } }