Beispiel #1
0
        public override void SelectBestMatch()
        {
            _typed = ApplicableTo.GetText(ApplicableTo.TextBuffer.CurrentSnapshot);

            CustomFilter();

            IOrderedEnumerable <Completion> ordered = currentCompletions.OrderByDescending(c => GetHighlightedSpansInDisplayText(c.DisplayText).Sum(s => s.Length));

            if (ordered.Any())
            {
                int count = ordered.Count();
                SelectionStatus = new CompletionSelectionStatus(ordered.First(), count == 1, count == 1);
            }
            else
            {
                SelectBestMatch(CompletionMatchType.MatchDisplayText, false);
            }
        }