Skip to content

When invoking 'generate overrides' respect teh last user action wrt select-all/deselect-all#52992

Merged
CyrusNajmabadi merged 3 commits intodotnet:mainfrom
CyrusNajmabadi:genOverridesRemember
Apr 29, 2021
Merged

When invoking 'generate overrides' respect teh last user action wrt select-all/deselect-all#52992
CyrusNajmabadi merged 3 commits intodotnet:mainfrom
CyrusNajmabadi:genOverridesRemember

Conversation

@CyrusNajmabadi
Copy link
Contributor

Fixes #47806

The general idea is this: eery time the user chooses 'select all' or 'deselect all' in the dialog, we use that as hint to the next opening of hte dialog to decide if we should start with all items selected or deselected.

This means that if someone is in a mode where they're overrriding all/most of hte members (for example, when creating types that suclass Object and override Equals/GetHashCode/ToString) that they continue selecting all members. However, if they're in a mode where they're overriding a small set of items (for example, object hierarchies with tons of virtual members) they can choose to 'deselect all' and then in the future only have to select the items they care about, isntead of deselecting the items they don't care about.

This is a partial mitigation for #47806. Other things we'd likely want to do are allow for a filter-box to filter down to a smaller set of symbols by name that hte user cares about, as well as allowing symbols to be grouped by their containing type to make browsing easier.

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner April 28, 2021 17:43
@ghost ghost added the Area-IDE label Apr 28, 2021
@CyrusNajmabadi CyrusNajmabadi requested a review from ryzngard April 28, 2021 17:43

return SpecializedCollections.SingletonEnumerable(
new ApplyChangesOperation(newDocument.Project.Solution));
return new CodeActionOperation[]
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a unit test showing the select all/deselect all option saving?

@CyrusNajmabadi
Copy link
Contributor Author

Yup. I can try to find a way to test taht. Non-trivial as it's practically entirely at the UI layer :-/

@CyrusNajmabadi CyrusNajmabadi merged commit 29eb3fe into dotnet:main Apr 29, 2021
@ghost ghost added this to the Next milestone Apr 29, 2021
@CyrusNajmabadi CyrusNajmabadi deleted the genOverridesRemember branch April 29, 2021 05:22
@RikkiGibson RikkiGibson modified the milestones: Next, 17.0.P2 Jun 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add search for quick action "Generate overrides..."

3 participants