Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 refactoring: renaming method parameters

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
Luke1410 Posted - Mar 26 2010 : 2:39:30 PM
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.
4   L A T E S T    R E P L I E S    (Newest First)
sean Posted - Nov 18 2013 : 3:29:13 PM
Change Signature was overhauled in build 2007 and now supports changes to a class hierarchy.
accord Posted - Aug 01 2012 : 11:10:56 PM
Thank you for the feedback.

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

case=3373
lac Posted - Aug 01 2012 : 04:25:45 AM
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)
{
}

accord Posted - Mar 26 2010 : 5:45:07 PM
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.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000