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
 Technical Support
 some suggestion about [changeSignature]
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

jzq740176597
Tomato Guru

China
346 Posts

Posted - Nov 21 2012 :  12:43:12 AM  Show Profile  Reply with Quote
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.

Creation come from persist!

feline
Whole Tomato Software

United Kingdom
19179 Posts

Posted - Nov 21 2012 :  1:13:41 PM  Show Profile  Reply with Quote
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?

zen is the art of being at one with the two'ness
Go to Top of Page

jzq740176597
Tomato Guru

China
346 Posts

Posted - Nov 21 2012 :  7:10:25 PM  Show Profile  Reply with Quote
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.

Creation come from persist!
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19179 Posts

Posted - Nov 21 2012 :  9:40:38 PM  Show Profile  Reply with Quote
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.

zen is the art of being at one with the two'ness
Go to Top of Page

jzq740176597
Tomato Guru

China
346 Posts

Posted - Nov 21 2012 :  11:45:06 PM  Show Profile  Reply with Quote

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.

Creation come from persist!

Edited by - jzq740176597 on Nov 21 2012 11:47:04 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19179 Posts

Posted - Nov 26 2012 :  10:15:35 PM  Show Profile  Reply with Quote
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

zen is the art of being at one with the two'ness
Go to Top of Page

jzq740176597
Tomato Guru

China
346 Posts

Posted - Nov 27 2012 :  02:20:09 AM  Show Profile  Reply with Quote
Thank you very much!

Creation come from persist!
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