public TypeScriptCompletionItem(CompletionEntry entry, CompletionEntryDetailsProvider completionDetailsProvider) : base(entry.name) { this.entry = entry; this.completionDetailsProvider = completionDetailsProvider; Image = GetImage(entry); }
public ICompletionItemList GenerateCompletionList(ITextEditor editor) { CompletionInfo result = context.GetCompletionItems( editor.FileName, editor.Caret.Offset, editor.Document.Text, memberCompletion); var itemList = new DefaultCompletionItemList(); if (result != null) { var completionDetailsProvider = new CompletionEntryDetailsProvider( context, editor.FileName, editor.Caret.Offset); itemList.Items.AddRange(result.entries.Select(entry => new TypeScriptCompletionItem(entry, completionDetailsProvider))); itemList.SortItems(); } return itemList; }