From 5a7b412c3822cf2fb73816f0dacdaec4f1b45d73 Mon Sep 17 00:00:00 2001 From: Leila Lali Date: Fri, 21 Oct 2016 15:50:12 -0700 Subject: [PATCH] changed the icons for the completion list based on the sql type (#112) * changed the icons for the completion list based on the sql type --- .../LanguageServices/AutoCompleteHelper.cs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/Microsoft.SqlTools.ServiceLayer/LanguageServices/AutoCompleteHelper.cs b/src/Microsoft.SqlTools.ServiceLayer/LanguageServices/AutoCompleteHelper.cs index c8e59cd2..67fb0a15 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/LanguageServices/AutoCompleteHelper.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/LanguageServices/AutoCompleteHelper.cs @@ -562,7 +562,7 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices { List completions = new List(); - + foreach (var autoCompleteItem in suggestions) { string insertText = GetCompletionItemInsertName(autoCompleteItem); @@ -576,21 +576,22 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices kind = CompletionItemKind.Field; break; case DeclarationType.Table: - kind = CompletionItemKind.Method; - break; - case DeclarationType.Database: + case DeclarationType.View: kind = CompletionItemKind.File; break; - case DeclarationType.Server: + case DeclarationType.Database: + kind = CompletionItemKind.Method; + break; + case DeclarationType.ScalarValuedFunction: + case DeclarationType.TableValuedFunction: + case DeclarationType.BuiltInFunction: kind = CompletionItemKind.Value; break; default: - kind = CompletionItemKind.Variable; + kind = CompletionItemKind.Unit; break; } - - // convert the completion item candidates into CompletionItems completions.Add(CreateCompletionItem(autoCompleteItem.Title, autoCompleteItem.Title, insertText, kind, row, startColumn, endColumn)); }