// Set the default visibility for each custom column.
// If there is an existing column state for the custom column, flip it to be non-visible by default at the start of FAR query.
// We do so because the column will have empty values for all results for a FAR query for certain cases such as types, literals, no references found case, etc.
// It is preferable to dynamically hide an empty column for such queries, and dynamically show the column if it has at least one non-default value.
// Compute the default visibility for each custom column.
// If there is an existing column state for the custom column, flip it to be non-visible
// by default at the start of FAR query.
// We do so because the column will have empty values for all results for a FAR query for
// certain cases such as types, literals, no references found case, etc.
// It is preferable to dynamically hide an empty column for such queries, and dynamically
// show the column if it has at least one non-default value.
Debug.Fail($"{nameof(SourceReferenceItem.ReferenceInfo)} has a key '{customColumnName}', but there is no exported '{nameof(AbstractFindUsagesCustomColumnDefinition)}' with this name.");
Debug.Fail($"{nameof(SourceReferenceItem.ReferenceInfo)} has a key '{customColumnName}', but there is no exported '{nameof(AbstractFindUsagesCustomColumnDefinition)}' with this name.");
continue;
}
// Ensure that we flip the visibility to true for the custom column.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
usingSystem;
usingSystem.Collections.Generic;
usingSystem.Collections.Immutable;
usingSystem.Diagnostics;
usingMicrosoft.CodeAnalysis.PooledObjects;
namespaceMicrosoft.CodeAnalysis
{
...
...
@@ -33,10 +34,11 @@ internal enum ValueUsageInfo
Reference=0x0100,
/// <summary>
/// Represents a name reference that neither reads nor writes the underlying value.
/// For example, 'nameof(x)' does not read or write the underlying value stored in 'x'.
/// Represents a name-only reference that neither reads nor writes the underlying value.
/// For example, 'nameof(x)' or reference to a symbol 'x' in a documentation comment
/// does not read or write the underlying value stored in 'x'.
/// </summary>
NameReference=0x1000,
NameOnly=0x1000,
/// <summary>
/// Represents a value read and/or write.
...
...
@@ -71,8 +73,8 @@ public static bool IsReadFrom(this ValueUsageInfo valueUsageInfo)