Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: Do not allow empty member selection in Extract struct fields and Generate getter/setter dialog #9146

Merged

Conversation

Kobzol
Copy link
Member

@Kobzol Kobzol commented Aug 1, 2022

This PR makes two small fixes to the Extract struct fields refactoring dialog, and one larger fix amongst all member-based refactorings. These refactorings enabled the "allow empty selection" option of the member selection dialog, which made it possible to run Extract Fields, Generate getter, Generate setter and Generate constructor refactorings with no members selected. This doesn't really make sense though, the only refactoring where it might be remotely useful is Generate constructor.

I have thus disabled empty selection for the mentioned refactorings, with the exception of Generate constructor.

Fixes: #9130

changelog: Do not enable struct field extraction or getter/setter generation of no fields are selected.

@Kobzol Kobzol added the fix Pull requests that fix some bug(s) label Aug 1, 2022
@Kobzol Kobzol requested a review from dima74 August 1, 2022 19:59
@Kobzol Kobzol added this to In Progress in To test via automation Aug 1, 2022
@dima74 dima74 self-assigned this Aug 1, 2022
@dima74
Copy link
Member

dima74 commented Aug 1, 2022

👍
bors r+

@bors
Copy link
Contributor

bors bot commented Aug 2, 2022

Build succeeded:

@bors bors bot merged commit b68ecfe into intellij-rust:master Aug 2, 2022
To test automation moved this from In Progress to Test Aug 2, 2022
@github-actions github-actions bot added this to the v176 milestone Aug 2, 2022
@Kobzol Kobzol deleted the ref-extract-struct-fields-dialog-fix branch August 2, 2022 06:17
@neonaot neonaot self-assigned this Aug 2, 2022
@neonaot neonaot moved this from Test to Done in To test Aug 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Pull requests that fix some bug(s)
Projects
To test
  
Done
Development

Successfully merging this pull request may close these issues.

Extract struct fields UI misleads
3 participants