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
This commit is contained in:
Leila Lali
2016-10-21 15:50:12 -07:00
committed by GitHub
parent 854a6a0eca
commit 5a7b412c38

View File

@@ -562,7 +562,7 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
{
List<CompletionItem> completions = new List<CompletionItem>();
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));
}