Exemple #1
0
        private void TextView_Closed(object sender, EventArgs e)
        {
            ThreadHelper.ThrowIfNotOnUIThread();

            if (sender is ITextView textView)
            {
                textView.Closed -= this.TextView_Closed;

                if (this.TryGetFileNameFromTextView(textView, out string filename) &&
                    this.IsSarifLogFile(filename) &&
                    this.IsSarifContentType(textView.TextBuffer.ContentType.TypeName))
                {
                    if (textBufferMap.ContainsKey(textView.TextBuffer))
                    {
                        textBufferMap[textView.TextBuffer]--;

                        if (textBufferMap[textView.TextBuffer] <= 0)
                        {
                            ErrorListService.CloseSarifLogs(new[] { filename });
                            textBufferMap.TryRemove(textView.TextBuffer, out int value);
                        }
                    }
                }
            }
        }
        private void TextView_Closed(object sender, EventArgs e)
        {
            ThreadHelper.ThrowIfNotOnUIThread();

            if (sender is ITextView textView)
            {
                textView.Closed -= this.TextView_Closed;

                if (this.TryGetFileNameFromTextView(textView, out string filename))
                {
                    ErrorListService.CloseSarifLogs(new[] { filename });
                }
            }
        }
Exemple #3
0
 /// <inheritdoc/>
 public void CloseSarifLogs(IEnumerable <string> paths)
 {
     ErrorListService.CloseSarifLogs(paths);
 }