public void Start() { if (IsStarted) { throw new InvalidOperationException(); } if (IsDismissed) { throw new InvalidOperationException(); } IsStarted = true; this.completionSources = CreateCompletionSources(); var list = new List <CompletionCollection>(); foreach (var source in completionSources) { source.AugmentCompletionSession(this, list); } foreach (var cc in list) { completionCollections.Add(cc); } if (completionCollections.Count == 0) { Dismiss(); } else { SelectedCompletionCollection = completionCollections[0]; completionPresenter = completionPresenterService.Create(this); Debug.Assert(completionPresenter != null); sessionCommandTargetFilter = new SessionCommandTargetFilter(this); textViewPopup = new TextViewPopup(TextView, GetTrackingPoint(SelectedCompletionCollection), completionPresenter); textViewPopup.Show(); } }
public void Start() { if (IsStarted) { throw new InvalidOperationException(); } if (IsDismissed) { throw new InvalidOperationException(); } IsStarted = true; this.completionSources = CreateCompletionSources(); var list = new List <CompletionCollection>(); foreach (var source in completionSources) { source.AugmentCompletionSession(this, list); } foreach (var cc in list) { completionCollections.Add(cc); } if (completionCollections.Count == 0) { Dismiss(); } else { SelectedCompletionCollection = completionCollections[0]; completionPresenter = completionPresenterService.Create(this); Debug.Assert(completionPresenter != null); PresenterChanged?.Invoke(this, EventArgs.Empty); completionSessionCommandTargetFilter = new CompletionSessionCommandTargetFilter(this); } }