Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Refactor: Problem in "Change Signature"

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
mbobka Posted - Jun 29 2006 : 04:00:12 AM

class ABC {
public:
	void FunctionA( int aaa );
};

void ABC::FunctionA( int aaa ) {
	int ccc = 10;
	aaa = ccc;

}


If I try to change signature of FunctionA, to "void FunctionA( char bbb, int aaa )", then:


class ABC {
public:
	void FunctionA( char bbb, int aaa );
};

void ABC::FunctionA(  char bbb, int bbb  ) 
{
	int ccc = 10;
	bbb = ccc;

}


As you see all "aaa" will be changed to "bbb" in the implementation, but the signature in the class declaration is valid.
Ctrl-Z (Undo) returns all bbb to aaa, and makes code valid.

Also, you can see mysterious second space inserted before "char bbb" in implementation.
9   L A T E S T    R E P L I E S    (Newest First)
sean Posted - Nov 18 2013 : 3:15:08 PM
Change Signature was overhauled in build 2007.
case=1528 is fixed in build 2007
TheRawGod Posted - Aug 18 2006 : 09:30:16 AM
Ah, sorry for stupid question:(

Just tried and that worked fine.
Thanks.
rhummer Posted - Aug 18 2006 : 09:23:50 AM
TheRawGod: You can customize the formating of Create Implementation in the autotext entry called "Refactor Create Implementation"
TheRawGod Posted - Aug 18 2006 : 09:14:26 AM
And what about those spaces inserted after opening and before closing braces when changing signature / creating implementation?


class A
{
  int MemberA(int b);
};


after creating implementation it would look like:


int A::MemberA( int b )
{
  
}


Are those spaces a desired behaviour? Maybe it's worth allowing user to specify somehow on settings pages whether to insert them and how many?:)

Mentioned refactoring features are really handy but the fact that I have to remove those spaces is very annoying as usually deleting spaces requires about the same time I would spend doing copy/pasting in case of creating implementation that makes the latter refactoring functionality almost useless:(

WinXP SP2, MSVS2005, VAX 1532.
support Posted - Aug 12 2006 : 11:23:15 PM
Case 1529 is fixed in build 1532.
support Posted - Jul 05 2006 : 2:18:31 PM
Fix for case 1513 is in build 1528.

Change Signature does not mangle existing parameters when inserting new ones.
support Posted - Jun 30 2006 : 6:00:15 PM
Suggestion to eliminate warning when adding a parameter with a default value in C# and C++ is...

case=1528

Problem of misleading warning is...

case=1529
khb Posted - Jun 30 2006 : 08:51:33 AM
I also have some thoughts regarding Change Signature. After adding a function parameter on the rightmost side of the signature, a message box appears that claims: "Removal and/or reordering of parameters detected...". Well, I just added a parameter, so the message is a bit misleading. Moreover, when adding a parameter with a default value on the rightmost side of the signature, no message box needs to be displayed as everything should work like before.

Regards,
Marcus.
support Posted - Jun 29 2006 : 11:54:24 AM
VA X thinks you are renaming aaa to bbb and changing its type, then adding a new parameter called aaa. VA X should be smart enough to realize you are only inserting a parameter.

VA X appears to work correctly if you inserts parameters *after* existing parameters.

We'll make VA X smarter so it detects an insert prior to an existing parameter, or we'll prevent the complex refactoring and force you to do it in multiple steps.

case=1513

Workaround is to refactor in two steps:
1) Change signature and insert all new parameters *after* existing parameters.
2) Change signature to reorder parameters.


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