public override AbstractTableEntriesSnapshot <DiagnosticTableItem> CreateSnapshot( AbstractTableEntriesSource <DiagnosticTableItem> source, int version, ImmutableArray <DiagnosticTableItem> items, ImmutableArray <ITrackingPoint> trackingPoints ) { var diagnosticSource = (DiagnosticTableEntriesSource)source; var snapshot = new TableEntriesSnapshot( diagnosticSource, version, items, trackingPoints ); if (diagnosticSource.SupportSpanTracking && !trackingPoints.IsDefaultOrEmpty) { // track the open document so that we can throw away tracking points on document close properly _tracker.TrackOpenDocument( diagnosticSource.TrackingDocumentId, diagnosticSource.Key, snapshot ); } return(snapshot); }
protected override AbstractTableEntriesSnapshot <DiagnosticData> CreateSnapshot( int version, ImmutableArray <DiagnosticData> items, ImmutableArray <ITrackingPoint> trackingPoints) { var snapshot = new TableEntriesSnapshot(this, version, items, trackingPoints); if (_documentId != null && !trackingPoints.IsDefaultOrEmpty) { // track the open document so that we can throw away tracking points on document close properly _source._tracker.TrackOpenDocument(_documentId, _id, snapshot); } return(snapshot); }
public ITableEntriesSnapshot GetCurrentSnapshot() { lock (_gate) { // If our last cached snapshot matches our current version number, then we // can just return it. Otherwise, we need to make a snapshot that matches // our version. if (_lastSnapshot?.VersionNumber != CurrentVersionNumber) { _lastSnapshot = new TableEntriesSnapshot(_entries, CurrentVersionNumber); } return(_lastSnapshot); } }
public ITableEntriesSnapshot GetCurrentSnapshot() { lock (Gate) { // If our last cached snapshot matches our current version number, then we // can just return it. Otherwise, we need to make a snapshot that matches // our version. if (_lastSnapshot?.VersionNumber != CurrentVersionNumber) { // If we've been cleared, then just return an empty list of entries. var entries = _cleared ? ImmutableList <Entry> .Empty : Entries; _lastSnapshot = new TableEntriesSnapshot(entries, CurrentVersionNumber); } return(_lastSnapshot); } }
public ITableEntriesSnapshot GetCurrentSnapshot() { lock (_gate) { // If our last cached snapshot matches our current version number, then we // can just return it. Otherwise, we need to make a snapshot that matches // our version. if (_lastSnapshot?.VersionNumber != CurrentVersionNumber) { var entries = _currentlyGroupingByDefinition && !_alwaysIncludeDeclarations ? _entriesWithoutDeclarations : _entriesWithDeclarations; _lastSnapshot = new TableEntriesSnapshot(entries, CurrentVersionNumber); } return(_lastSnapshot); } }
public ITableEntriesSnapshot GetCurrentSnapshot() { lock (Gate) { // If our last cached snapshot matches our current version number, then we // can just return it. Otherwise, we need to make a snapshot that matches // our version. if (_lastSnapshot?.VersionNumber != CurrentVersionNumber) { var entries = _currentlyGroupingByDefinition ? EntriesWhenGroupingByDefinition : EntriesWhenNotGroupingByDefinition; _lastSnapshot = new TableEntriesSnapshot(entries, CurrentVersionNumber); } return(_lastSnapshot); } }
public object GetErrorListItemValue(int index, string columnName) { var snapshot = new TableEntriesSnapshot("A", @"C:\a.cpp", new[] { new ErrorListItem() { ProjectName = "", FileName = "git\\proj-a\\src\\a.cpp", Line = 182, Message = "This expression casts between two pointer types.", ErrorCode = "QACPP3030", ErrorCodeToolTip = "Get help for 'QACPP3030'", ErrorCategory = "Vulnerability", Severity = __VSERRORCATEGORY.EC_MESSAGE, HelpLink = "https://www.google.com" }, new ErrorListItem() { ProjectName = "", FileName = "git\\proj-a\\src\\b.cpp", Line = 59, Message = "This operation is redundant. The value of the result is always that of the left-hand operand.", ErrorCode = "QACPP2985", ErrorCodeToolTip = "Get help for 'QACPP2985'", ErrorCategory = "Minor Bug", Severity = __VSERRORCATEGORY.EC_MESSAGE, HelpLink = "https://www.google.com" } }); object content = null; if (snapshot.TryGetValue(index, columnName, out content)) { return(content); } return(null); }
public ITableEntriesSnapshot GetCurrentSnapshot() { lock (Gate) { // If our last cached snapshot matches our current version number, then we // can just return it. Otherwise, we need to make a snapshot that matches // our version. if (_lastSnapshot?.VersionNumber != CurrentVersionNumber) { // If we've been cleared, then just return an empty list of entries. // Otherwise return the appropriate list based on how we're currently // grouping. var entries = _cleared ? ImmutableList <Entry> .Empty : _currentlyGroupingByDefinition ? EntriesWhenGroupingByDefinition : EntriesWhenNotGroupingByDefinition; _lastSnapshot = new TableEntriesSnapshot(entries, CurrentVersionNumber); } return(_lastSnapshot); } }
public ITableEntriesSnapshot GetCurrentSnapshot() { lock (_gate) { // If our last cached snapshot matches our current version number, then we // can just return it. Otherwise, we need to make a snapshot that matches // our version. if (_lastSnapshot?.VersionNumber != CurrentVersionNumber) { _lastSnapshot = new TableEntriesSnapshot(_entries, CurrentVersionNumber); } return _lastSnapshot; } }
public ITableEntriesSnapshot GetCurrentSnapshot() { lock (_gate) { // If our last cached snapshot matches our current version number, then we // can just return it. Otherwise, we need to make a snapshot that matches // our version. if (_lastSnapshot?.VersionNumber != CurrentVersionNumber) { var entries = _currentlyGroupingByDefinition && !_alwaysIncludeDeclarations ? _entriesWithoutDeclarations : _entriesWithDeclarations; _lastSnapshot = new TableEntriesSnapshot(entries, CurrentVersionNumber); } return _lastSnapshot; } }