Skip to content

Commit

Permalink
Merge branch 'shengyfu-pr/842'
Browse files Browse the repository at this point in the history
  • Loading branch information
shengyfu committed Aug 7, 2019
2 parents 7ef82fe + 4f4d94b commit 8d7acab
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,20 @@ public enum CompletionItemKind

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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public async void AutoCompleteWithExtension()
//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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ private async Task<CompletionItem[]> Run(CompletionItem[] completions, Cancellat
{
item.Command = new Command
{
CommandStr = "vsintellicode.completionItemSelected",
command = "vsintellicode.completionItemSelected",
Arguments = new object[] { new Dictionary<string, string> { { "IsCommit", "True" } } }
};
}
Expand Down

0 comments on commit 8d7acab

Please sign in to comment.