Beispiel #1
0
 public void ParseInformationUpdated(ParseInformation parseInfo)
 {
     if (parseInfo != null && CodeEditorOptions.Instance.EnableQuickClassBrowser)
     {
         // don't create quickClassBrowser for files that don't have any classes
         // (but do keep the quickClassBrowser when the last class is removed from a file)
         if (quickClassBrowser != null || parseInfo.UnresolvedFile.TopLevelTypeDefinitions.Count > 0)
         {
             if (quickClassBrowser == null)
             {
                 quickClassBrowser            = new QuickClassBrowser();
                 quickClassBrowser.JumpAction = (line, col) => ActiveTextEditor.JumpTo(line, col);
                 SetRow(quickClassBrowser, 0);
                 this.Children.Add(quickClassBrowser);
             }
             quickClassBrowser.Update(parseInfo.UnresolvedFile);
             quickClassBrowser.SelectItemAtCaretPosition(this.ActiveTextEditor.TextArea.Caret.Location);
         }
     }
     else
     {
         if (quickClassBrowser != null)
         {
             this.Children.Remove(quickClassBrowser);
             quickClassBrowser = null;
         }
     }
     iconBarManager.UpdateClassMemberBookmarks(parseInfo != null ? parseInfo.UnresolvedFile : null, document);
     primaryTextEditor.UpdateParseInformationForFolding(parseInfo);
 }