-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Offer add parameter to constructor refactoring for all applicable constructors #34041
Conversation
@chborl can you update your title to be clearer? Which feature is this for, for example. |
...eFromMembers/AddConstructorParametersFromMembers/AddConstructorParametersFromMembersTests.cs
Show resolved
Hide resolved
...eFromMembers/AddConstructorParametersFromMembers/AddConstructorParametersFromMembersTests.cs
Outdated
Show resolved
Hide resolved
...eFromMembers/AddConstructorParametersFromMembers/AddConstructorParametersFromMembersTests.cs
Outdated
Show resolved
Hide resolved
...onstructorParametersFromMembersCodeRefactoringProvider.AddConstructorParametersCodeAction.cs
Outdated
Show resolved
Hide resolved
...onstructorParametersFromMembersCodeRefactoringProvider.AddConstructorParametersCodeAction.cs
Show resolved
Hide resolved
...onstructorParametersFromMembersCodeRefactoringProvider.AddConstructorParametersCodeAction.cs
Outdated
Show resolved
Hide resolved
...onstructorParametersFromMembersCodeRefactoringProvider.AddConstructorParametersCodeAction.cs
Outdated
Show resolved
Hide resolved
...onstructorParametersFromMembersCodeRefactoringProvider.AddConstructorParametersCodeAction.cs
Outdated
Show resolved
Hide resolved
...torParametersFromMembers/AddConstructorParametersFromMembersCodeRefactoringProvider.State.cs
Outdated
Show resolved
Hide resolved
...nstructorParametersFromMembers/AddConstructorParametersFromMembersCodeRefactoringProvider.cs
Show resolved
Hide resolved
@CyrusNajmabadi, can you take another look? Thanks :) |
...torParametersFromMembers/AddConstructorParametersFromMembersCodeRefactoringProvider.State.cs
Outdated
Show resolved
Hide resolved
...torParametersFromMembers/AddConstructorParametersFromMembersCodeRefactoringProvider.State.cs
Outdated
Show resolved
Hide resolved
...torParametersFromMembers/AddConstructorParametersFromMembersCodeRefactoringProvider.State.cs
Outdated
Show resolved
Hide resolved
Co-Authored-By: chborl <chborl@users.noreply.github.com>
Co-Authored-By: chborl <chborl@users.noreply.github.com>
…into deserializationctor
...torParametersFromMembers/AddConstructorParametersFromMembersCodeRefactoringProvider.State.cs
Outdated
Show resolved
Hide resolved
...torParametersFromMembers/AddConstructorParametersFromMembersCodeRefactoringProvider.State.cs
Outdated
Show resolved
Hide resolved
...torParametersFromMembers/AddConstructorParametersFromMembersCodeRefactoringProvider.State.cs
Outdated
Show resolved
Hide resolved
...torParametersFromMembers/AddConstructorParametersFromMembersCodeRefactoringProvider.State.cs
Outdated
Show resolved
Hide resolved
...torParametersFromMembers/AddConstructorParametersFromMembersCodeRefactoringProvider.State.cs
Outdated
Show resolved
Hide resolved
...nstructorParametersFromMembers/AddConstructorParametersFromMembersCodeRefactoringProvider.cs
Outdated
Show resolved
Hide resolved
...nstructorParametersFromMembers/AddConstructorParametersFromMembersCodeRefactoringProvider.cs
Outdated
Show resolved
Hide resolved
...nstructorParametersFromMembers/AddConstructorParametersFromMembersCodeRefactoringProvider.cs
Outdated
Show resolved
Hide resolved
...eFromMembers/AddConstructorParametersFromMembers/AddConstructorParametersFromMembersTests.cs
Outdated
Show resolved
Hide resolved
...eFromMembers/AddConstructorParametersFromMembers/AddConstructorParametersFromMembersTests.cs
Outdated
Show resolved
Hide resolved
Co-Authored-By: chborl <chborl@users.noreply.github.com>
Co-Authored-By: chborl <chborl@users.noreply.github.com>
...nstructorParametersFromMembers/AddConstructorParametersFromMembersCodeRefactoringProvider.cs
Outdated
Show resolved
Hide resolved
...nstructorParametersFromMembers/AddConstructorParametersFromMembersCodeRefactoringProvider.cs
Show resolved
Hide resolved
...nstructorParametersFromMembers/AddConstructorParametersFromMembersCodeRefactoringProvider.cs
Outdated
Show resolved
Hide resolved
stopping review. this looks like this still needs a pass by @chborl first to deal with the existing feedback. |
@sharwell and @CyrusNajmabadi for review. Thanks :) |
...eFromMembers/AddConstructorParametersFromMembers/AddConstructorParametersFromMembersTests.cs
Show resolved
Hide resolved
...eFromMembers/AddConstructorParametersFromMembers/AddConstructorParametersFromMembersTests.cs
Outdated
Show resolved
Hide resolved
...nstructorParametersFromMembers/AddConstructorParametersFromMembersCodeRefactoringProvider.cs
Outdated
Show resolved
Hide resolved
Co-Authored-By: chborl <chborl@users.noreply.github.com>
Co-Authored-By: chborl <chborl@users.noreply.github.com>
...ualBasicTest/AddConstructorParametersFromMembers/AddConstructorParametersFromMembersTests.vb
Outdated
Show resolved
Hide resolved
...ualBasicTest/AddConstructorParametersFromMembers/AddConstructorParametersFromMembersTests.vb
Outdated
Show resolved
Hide resolved
...ualBasicTest/AddConstructorParametersFromMembers/AddConstructorParametersFromMembersTests.vb
Outdated
Show resolved
Hide resolved
...ualBasicTest/AddConstructorParametersFromMembers/AddConstructorParametersFromMembersTests.vb
Outdated
Show resolved
Hide resolved
Update doc comment Co-Authored-By: chborl <chborl@users.noreply.github.com>
Apologies if I missed an existing conversation on this, but should we need to limit 1) The number of constructors listed in these submenus, or 2) The length of the constructor symbol display? |
@dpoeschl , here is a screenshot with 16 constructors: The width of the sub menu is limited with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Fixes #33603
Fixes #33623
When one or more members are selected, user can Ctrl+. to add them as parameters to any applicable parameter. If more that one constructor is applicable, suggested actions will be nested under 2 menu items, "Add parameter to constructor" and "Add optional parameter to constructor"
In addition, this PR ensures parameters will not be offered for deserialization constructors.