internal void ShowInsightWindow(WabbitcodeInsightWindow window) { CloseExistingInsightWindow(); insightWindow = window; window.Closed += delegate { insightWindow = null; }; Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action( delegate { if (insightWindow == window) { window.Show(); } } )); }
public override IInsightWindow ShowInsightWindow(IEnumerable <IInsightItem> items) { if (items == null) { return(null); } var insightWindow = new WabbitcodeInsightWindow(this.TextEditor.TextArea); insightWindow.Items.AddRange(items); if (insightWindow.Items.Count > 0) { insightWindow.SelectedItem = insightWindow.Items[0]; } else { // don't open insight window when there are no items return(null); } textEditor.ShowInsightWindow(insightWindow); return(insightWindow); }
public SDItemProvider(WabbitcodeInsightWindow insightWindow) { this.insightWindow = insightWindow; insightWindow.items.CollectionChanged += insightWindow_items_CollectionChanged; }