Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Feature Requests
 refactoring: renaming method parameters
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Luke1410
Senior Member

32 Posts

Posted - Mar 26 2010 :  2:39:30 PM  Show Profile  Reply with Quote
steps to reproduce:

sample code:
class Test
{
	void Foo(float test);
};

void Test::Foo(float test)
{
	test = 5;
}


1. right-click on "test" in the class definition.
2. choose Rename...

Actual result:
The list shows:
- void Foo(float test);

Expected result:
The list shows:
- void Foo(float test);
- void Test::Foo(float test)
- test = 5;

Case 2:
1. right-click on "test" in the method definition.
2. choose Rename...

Actual result:
The list shows:
- void Test::Foo(float test)
- test = 5;

Expected result:
The list shows:
- void Foo(float test);
- void Test::Foo(float test)
- test = 5;


I understand that it's not absolutely necessary that variable names in either the definition or the declaration do match, but if they are the same and the developer wants to rename them, he (IMO) would expect that after refactoring, the names used in the declaration and the definition are still the same.

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Mar 26 2010 :  5:45:07 PM  Show Profile  Reply with Quote
I am seeing the same effect here. Thank you for the clear description.

case=1140

For now, you can use change signature (which will rename the function parameter both in declaration and definition) as a workaround.
Go to Top of Page

lac
Senior Member

30 Posts

Posted - Aug 01 2012 :  04:25:45 AM  Show Profile  Reply with Quote
I miss this feature as well.

Additionally, it would be very nice to get an option to rename the same argument in base/derived classes with the same function signature. I.e. in all three places here:

class A
{
public:
    void Foo(float test) = 0;
};

class B
{
public:
   void Foo(float test);
}

void B::Foo(float test)
{
}

Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Aug 01 2012 :  11:10:56 PM  Show Profile  Reply with Quote
Thank you for the feedback.

We are considering to make Change Signature work across derived classes, at some point:

case=3373
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Nov 18 2013 :  3:29:13 PM  Show Profile  Reply with Quote
Change Signature was overhauled in build 2007 and now supports changes to a class hierarchy.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000