Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 some suggestion about [changeSignature]

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
jzq740176597 Posted - Nov 21 2012 : 12:43:12 AM
For me,to tell the truth,The current [changeSignature] function is rarely used.
Not because the need for [changeSignature] is few,on the contrary,for me,I do [changeSignature] so frequently.
2 reason for that:
(1)in the dialog of current [changeSignature] is not code-context aware,no-IntelliSense,so easy to make mistake.
(2)many times I do like this :I change the signature in cpp's imp or declare in h,And I need to apply the change to another side to ensure the function's signature coincident in both sides.
So My advice is :why not the VA can do new function like [synchronizeSignature]or [applySignatureChange],is really make sense I think.
Now I have to change in imp's side,and copy the new to declare,and delete the old one.Is boring.
6   L A T E S T    R E P L I E S    (Newest First)
jzq740176597 Posted - Nov 27 2012 : 02:20:09 AM
Thank you very much!
feline Posted - Nov 26 2012 : 10:15:35 PM
I follow now, and this makes sense. Sorry this took so long. I have put in a feature request for this to see what our developers make of it:

case=70849
jzq740176597 Posted - Nov 21 2012 : 11:45:06 PM

You misunderstood my meaning.
I know [change Signature]does update both the cpp and .h files for me. It really does.

I mean:Many times I am used to munaually change the signature in cpp's imp or declare in h,in just 1 side.
To ensure the consistency.I have to copy the newly changed signature to another side.
So why I don't use the[change Signature] which can do the change in both sides in the meantime.
Just because-?-?[changeSignature] is not code-context aware,no-IntelliSense,so easy to make mistake.
So I hope VA can help me synchronize the newly munually changed signature to another side.
feline Posted - Nov 21 2012 : 9:40:38 PM
Change Signature does update both the cpp and .h files for me. Using VS2008, VA 1918 and with Windows XP I have this code in the .h file:


class testChangeSig
{
	void RemoveConst() const;
	void AddParameter1();
};


and this code in the matching cpp file:

void testChangeSig::RemoveConst() const
{
}

void testChangeSig::AddParameter1() {
}


when I run Change Signature both files are updated. Can you please try the same test on your system and see what results you get.
jzq740176597 Posted - Nov 21 2012 : 7:10:25 PM
quote:
Which IDE and version of VA are you using?

I use VA 1918,VS2008
quote:
we don't have a file or position to help us work out what to put in the listbox,

I don't think so.The context is same with manually change signature in the function-body (implementation) or the declare or the caret-place when invoke the [changeSignature] command.

Another I hope you consider my suggestion about:

many times I munaually change the signature in cpp's imp or declare in h,It's just 1 side!
And I need to apply the change to another side to ensure the function's signature coincident in both sides.Hope VA can Fo the Work for me!
So My advice is :why not the VA can do new function like [synchronizeSignature]or [applySignatureChange],is really make sense I think.
feline Posted - Nov 21 2012 : 1:13:41 PM
We are considering adding listboxes to the refactoring dialogs:

case=60853

Since you are not typing in the editor, we don't have a file or position to help us work out what to put in the listbox, so this is not as easy as it sounds.

Change Signature is designed to update both the declaration and the implementation. You should never have to do these updates manually. Which IDE and version of VA are you using?

If you are using VS2010 can you please download and open this test solution:

http://forum.wholetomato.com/colin/forumimages/topic10989_va_test_refactoring.zip

which is designed to help test Change Signature. It contains the two files "test_change_signature.h" and "test_change_signature.cpp", and any Change Signature in these two files should always update both the declaration and the implementation. Can you try this please, and see what results you get?

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