Merge branch 'shengyu_0804' of https://github.com/shengyfu/sqltoolsservice into shengyfu-pr/842

This commit is contained in:
Shengyu Fu
2019-08-07 11:56:14 -07:00
3 changed files with 13 additions and 3 deletions

View File

@@ -55,10 +55,20 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts
public class Command
{
/// <summary>
/// Title of the command.
/// </summary>
public string Title { get; set; }
/// <summary>
/// The identifier of the actual command handler, like `vsintellicode.completionItemSelected`.
/// </summary>
public string CommandStr { get; set; }
public string command { get; set; }
/// <summary>
/// A tooltip for the command, when represented in the UI.
/// </summary>
public string Tooltip { get; set; }
/// <summary>
/// Arguments that the command handler should be invoked with.

View File

@@ -186,7 +186,7 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.LanguageServer
//Validate the first completion item in the list is preselected
Assert.True(completions[0].Preselect.HasValue && completions[0].Preselect.Value, "Preselect is not set properly in the first completion item by the completion extension!");
//Validate the Command object attached to the completion item by the extension
Assert.True(completions[0].Command != null && completions[0].Command.CommandStr == "vsintellicode.completionItemSelected", "Command is not set properly in the first completion item by the completion extension!");
Assert.True(completions[0].Command != null && completions[0].Command.command == "vsintellicode.completionItemSelected", "Command is not set properly in the first completion item by the completion extension!");
}
finally
{

View File

@@ -66,7 +66,7 @@ namespace Microsoft.SqlTools.Test.CompletionExtension
{
item.Command = new Command
{
CommandStr = "vsintellicode.completionItemSelected",
command = "vsintellicode.completionItemSelected",
Arguments = new object[] { new Dictionary<string, string> { { "IsCommit", "True" } } }
};
}