Skip to content

Conversation

@CyrusNajmabadi
Copy link
Member

@CyrusNajmabadi CyrusNajmabadi commented Aug 19, 2024

Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2201415

Ensure that the initial symbol a user performs 'find all references' on is prioritized at the top of the FAR window (above all cascaded symbols):

image

@ghost ghost added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Aug 19, 2024
@CyrusNajmabadi CyrusNajmabadi changed the title WIP: Prioritize FAR results. Prioritize original user symbol in FAR results above cascaded symbols. Aug 19, 2024
protected readonly List<Entry> EntriesWhenNotGroupingByDefinition = [];
protected readonly List<Entry> EntriesWhenGroupingByDefinition = [];
protected readonly (List<Entry> primary, List<Entry> nonPrimary) EntriesWhenNotGroupingByDefinition = ([], []);
protected readonly (List<Entry> primary, List<Entry> nonPrimary) EntriesWhenGroupingByDefinition = ([], []);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

general idea is that we have 'entries' sorted into two sections. The 'primary' entries (those associated with the original symbol teh user is finding) and non-primary (those that came about from cascading).

=> _lazyClassificationFormatMap.Value;

private static bool IsPrimary(DefinitionItem definition)
=> definition.Properties.ContainsKey(DefinitionItem.Primary);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we already had this data in the definitionItem. We were using it for other featuers. but hadn't updated FAR properly.

@CyrusNajmabadi CyrusNajmabadi marked this pull request as ready for review August 19, 2024 16:46
@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner August 19, 2024 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead VSCode

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants