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

Refactoring -> Rename should rename fields/variables/parameters #39138

Open
vsfeedback opened this issue Oct 8, 2019 · 2 comments
Open

Refactoring -> Rename should rename fields/variables/parameters #39138

vsfeedback opened this issue Oct 8, 2019 · 2 comments
Labels
Area-IDE Developer Community The issue was originally reported on https://developercommunity.visualstudio.com Feature - Rename Feature Request Need Design Review The end user experience design needs to be reviewed and approved.
Milestone

Comments

@vsfeedback
Copy link

This issue has been moved from a ticket on Developer Community.


Often using DI we have things like

public MyClass(IFirstInterface firstInterface, ISecondInterface secondInterface)
{
_firstInterface = firstInterface;
_secondInterface = secondInterface;
}

Currently, if i rename IFirstInterface -> ISomethingElse it only renames the interface, not the fields, variables and parameters.

public MyClass(ISomethingElse firstInterface, ISecondInterface secondInterface)
{
_firstInterface = firstInterface;
_secondInterface = secondInterface;
}

Really it should go further and do the same as Resharper:

public MyClass(ISomethingElse somethingElse, ISecondInterface secondInterface)
{
_somethingElse= somethingElse;
_secondInterface = secondInterface;
}


Original Comments

Jane Wu [MSFT] on 10/8/2019, 05:26 AM:

Thank you for taking the time to provide your suggestion. We will do some preliminary checks to make sure we can proceed further. We’ll provide an update once the issue has been triaged by the product team.

@jmarolf
Copy link
Contributor

jmarolf commented Oct 9, 2019

I think I'll proto-type this out real fast. IF the design meeting says they don't like it we can close the PR

@jinujoseph jinujoseph added Feature Request Need Design Review The end user experience design needs to be reviewed and approved. labels Oct 15, 2019
@jinujoseph jinujoseph added this to In Queue in IDE: Design review via automation Oct 15, 2019
@jinujoseph jinujoseph added this to the Backlog milestone Oct 15, 2019
@jinujoseph jinujoseph moved this from In Queue to Next meeting in IDE: Design review Oct 15, 2019
@sharwell sharwell moved this from Next meeting to Need Proposal in IDE: Design review Oct 21, 2019
@mikadumont
Copy link
Contributor

Related customer feedback copying here:

When renaming a class or interface, it would be nice to rename all variables that are of that type to match the class name

For example, when renaming MyClass to YourClass, this line

MyClass myClass = new MyClass();

becomes:

YourClass yourClass = new YourClass();

And that's everywhere in the solution

@sharwell sharwell added the Developer Community The issue was originally reported on https://developercommunity.visualstudio.com label Nov 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Developer Community The issue was originally reported on https://developercommunity.visualstudio.com Feature - Rename Feature Request Need Design Review The end user experience design needs to be reviewed and approved.
Projects
Status: Need Proposal
IDE: Design review
  
Need Proposal
Development

No branches or pull requests

7 participants