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
 Problem with 'Change signature'
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

khb
Tomato Guru

Germany
337 Posts

Posted - Jan 22 2009 :  03:26:13 AM  Show Profile  Reply with Quote
I'm having a problem when doing consecutive 'Change signature' commands. My task was to change the signature of several functions. For those I wanted to change the only parameter char* to TCHAR*. The first time causes no problem. But afterwards I can't change the signature of another function. The refactoring menu always claims: "Refactoring not possible". Saving that file or compiling the project doesn't change the behavior. I have to close and re-open the file before the refactoring menu offers 'Change signature' again.

I'm using VC6, Build 1711, WinXP, no other add-ins.

Regards
Marcus

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Jan 23 2009 :  10:05:42 AM  Show Profile  Reply with Quote
Very odd. Can you try adding the Reparse current file toolbar button to the VA toolbar please, and then press this button when you see this problem.

I am wondering if this will help.

It sounds like our parser is confused about something, but I don't see why.

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

khb
Tomato Guru

Germany
337 Posts

Posted - Jan 24 2009 :  5:42:27 PM  Show Profile  Reply with Quote
*sigh* I don't know what happened last time, but now where I tried it again recompiling helps. Reparsing helps, too. Anyway, it would be nice if a second 'Change signature' would be possible without reparsing.

Regards
Marcus
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Jan 26 2009 :  1:36:45 PM  Show Profile  Reply with Quote
I have just tried a simple test, I have run Change Signature 4 times in a row, with VC6, in a C++ .h file, with no problems at all.

You should be able to run multiple Change Signature's without problems.

When you did this, what file were you sitting in? A header or a cpp file?

In my test VA was changing me to the cpp file, since all of my test functions have implementations. The alt-o might be helping here, encouraging VA to reparse.

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

khb
Tomato Guru

Germany
337 Posts

Posted - Jan 26 2009 :  4:01:17 PM  Show Profile  Reply with Quote
Like you I was sitting in a header file. And VA was changing me to the cpp file as well. I then hit the button in the toolbar that takes me back to the header file (the one that does the same like alt+o). Then I had to press the reparse button before I was able see the refactoring items in the context menu. I opened the context menu by pressing the small icon that appears while hovering over the function declaration that I wanted to change.

Regards
Marcus
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Jan 27 2009 :  12:55:12 PM  Show Profile  Reply with Quote
If you wait a few seconds, 5 or 10, after switching back to the header file, and then try to trigger the command a second time, is it now shown as available?

I am seeing something similar here, using your steps, but the problem only shows up if I try to trigger Change Signature very quickly after swapping back to the header file. If I am told no refactoring commands are available, then wait a few seconds, and try again the command is available and works correctly.

If this does not help, it is almost as if something is getting in the way of VA re-parsing the file automatically, but that does not make much sense.

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

khb
Tomato Guru

Germany
337 Posts

Posted - Jan 28 2009 :  09:27:28 AM  Show Profile  Reply with Quote
I waited for more than a minute and nothing changed. Even swapping between files several times by using the corresponding button in the toolbar doesn't help. But if I press alt+o once then the correct context menu is shown. Seems to me if there is a difference between alt+o and the corresponding toolbar button...

Regards
Marcus
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Jan 28 2009 :  2:27:10 PM  Show Profile  Reply with Quote
It does sound like that, but so far I cannot reproduce this problem, even using the toolbar button.

Is there any chance of getting a copy of these two files, the cpp and .h, so I can try and reproduce the problem here? I understand this is often not possible, but it is worth asking. If it is possible can you please submit the files via the form:

http://www.wholetomato.com/support/contact.asp

including this thread ID or URL in the description, so we can match it up.

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

khb
Tomato Guru

Germany
337 Posts

Posted - Jan 29 2009 :  04:01:44 AM  Show Profile  Reply with Quote
I just sent you a zip file. The problem also appears on new projects for me. Therefore I created a new console application, added a new class to it, and added two new functions to the new class. I described what I did then within the file.

Regards
Marcus
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Jan 29 2009 :  12:24:40 PM  Show Profile  Reply with Quote
I have the zip file, thank you for this, and they very clear instructions I am seeing the same problem here. I am not sure why it did not show up so clearly in my initial tests, but it definitely happens with this test solution:

case=23399

As you say, the problem does seem to be specific to the Open Corresponding File toolbar button. You may find that using the Shift + Right Click menu to trigger refactoring is more reliable. It seems to be more reliable for me, often offering a refactoring even after changing files with the toolbar button.

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

khb
Tomato Guru

Germany
337 Posts

Posted - Feb 02 2009 :  03:31:19 AM  Show Profile  Reply with Quote
I'm glad that you can reproduce the problem. And thank you for the "Shift + Right Click" hint. I wasn't aware of this. I'll give it a try.

Regards
Marcus
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