Exemplo n.º 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);
 }
Exemplo n.º 2
0
 private void EhDiagnosticClicked(AltaxoDiagnostic diag)
 {
     if (diag.Line.HasValue)
     {
         ActiveTextEditor.JumpTo(diag.Line.Value, diag.Column ?? 1);
     }
 }
Exemplo n.º 3
0
 private void EhQuickClassBrowser_JumpTo(int caretOffset)
 {
     ActiveTextEditor.JumpTo(caretOffset);
 }