Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Problem with '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
khb Posted - Jan 22 2009 : 03:26:13 AM
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
10   L A T E S T    R E P L I E S    (Newest First)
khb Posted - Feb 02 2009 : 03:31:19 AM
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
feline Posted - Jan 29 2009 : 12:24:40 PM
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.
khb Posted - Jan 29 2009 : 04:01:44 AM
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
feline Posted - Jan 28 2009 : 2:27:10 PM
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.
khb Posted - Jan 28 2009 : 09:27:28 AM
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
feline Posted - Jan 27 2009 : 12:55:12 PM
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.
khb Posted - Jan 26 2009 : 4:01:17 PM
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
feline Posted - Jan 26 2009 : 1:36:45 PM
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.
khb Posted - Jan 24 2009 : 5:42:27 PM
*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
feline Posted - Jan 23 2009 : 10:05:42 AM
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.

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