private void ShowInsightWindow(TextEditor items, SharpDevelopInsightWindow insightWindow)
 {
     CloseExistingInsightWindow();
     _activeInsightWindow  = insightWindow;
     insightWindow.Closed += delegate { _activeInsightWindow = null; };
     items.Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(
                                      delegate
     {
         if (ActiveInsightWindow ==
             insightWindow)
         {
             insightWindow.Show();
         }
     }
                                      ));
 }
        public override IInsightWindow ShowInsightWindow(IEnumerable <IInsightItem> items)
        {
            if (items == null)
            {
                return(null);
            }
            var insightWindow = new SharpDevelopInsightWindow(TextEditor.TextArea);

            foreach (IInsightItem insightItem in items)
            {
                insightWindow.Items.Add(insightItem);
            }
            if (insightWindow.Items.Count > 0)
            {
                insightWindow.SelectedItem = insightWindow.Items[0];
            }
            else
            {
                return(null);
            }
            ShowInsightWindow(textEditor, insightWindow);
            return(insightWindow);
        }
Esempio n. 3
0
 public SDItemProvider(SharpDevelopInsightWindow insightWindow)
 {
     this.insightWindow = insightWindow;
     insightWindow.items.CollectionChanged += insightWindow_items_CollectionChanged;
 }