mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-01 17:24:42 -05:00
fixed changes according to review
This commit is contained in:
@@ -46,7 +46,7 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices.Completion
|
||||
{
|
||||
InsertText = GetCompletionItemInsertName();
|
||||
Label = DeclarationTitle;
|
||||
if (StartsWithBracket(TokenText) || IsReservedWord(InsertText))
|
||||
if (StartsWithBracket(TokenText) || AutoCompleteHelper.IsReservedWord(InsertText))
|
||||
{
|
||||
Label = WithBracket(Label);
|
||||
InsertText = WithBracket(InsertText);
|
||||
@@ -203,12 +203,5 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices.Completion
|
||||
return text;
|
||||
}
|
||||
}
|
||||
|
||||
private bool IsReservedWord(string text)
|
||||
{
|
||||
string[] ReservedWords = AutoCompleteHelper.GetReservedWordList();
|
||||
int pos = Array.IndexOf(ReservedWords, text.ToLower());
|
||||
return pos > -1 ? true : false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user