mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-16 18:47:57 -05:00
Merge branch 'shengyu_0804' of https://github.com/shengyfu/sqltoolsservice into shengyfu-pr/842
This commit is contained in:
@@ -55,10 +55,20 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts
|
|||||||
|
|
||||||
public class Command
|
public class Command
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Title of the command.
|
||||||
|
/// </summary>
|
||||||
|
public string Title { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The identifier of the actual command handler, like `vsintellicode.completionItemSelected`.
|
/// The identifier of the actual command handler, like `vsintellicode.completionItemSelected`.
|
||||||
/// </summary>
|
/// </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>
|
/// <summary>
|
||||||
/// Arguments that the command handler should be invoked with.
|
/// Arguments that the command handler should be invoked with.
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.LanguageServer
|
|||||||
//Validate the first completion item in the list is preselected
|
//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!");
|
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
|
//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
|
finally
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ namespace Microsoft.SqlTools.Test.CompletionExtension
|
|||||||
{
|
{
|
||||||
item.Command = new Command
|
item.Command = new Command
|
||||||
{
|
{
|
||||||
CommandStr = "vsintellicode.completionItemSelected",
|
command = "vsintellicode.completionItemSelected",
|
||||||
Arguments = new object[] { new Dictionary<string, string> { { "IsCommit", "True" } } }
|
Arguments = new object[] { new Dictionary<string, string> { { "IsCommit", "True" } } }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user