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
 VAX 1530: rename on template classes
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Uniwares
Tomato Guru

Portugal
2321 Posts

Posted - Jul 12 2006 :  12:53:25 PM  Show Profile  Reply with Quote
Renaming template classes fails to do its job. Only the ctor/dtor are renamed, other members are not found/renamed and the classname for the ctor/dtor remains unchanged.

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Jul 15 2006 :  1:49:56 PM  Show Profile  Reply with Quote
using VS2005, VA 1530 and C++ i have just tested this, and the rename worked perfectly for me.

i tested this using a template class defined in a header file, with all of its functions implemented in the same header file, below the class definition.

i triggered rename on the class name, at the very top of the class definition. all instances of the template were also renamed and the code compiles, which is always a good sign.

where and how did you trigger the rename? i wonder if that matters.
if you do a find references for the template class are the results even close to correct? theoretically find references should show the same problem, since this is how rename finds the things to rename.

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

Uniwares
Tomato Guru

Portugal
2321 Posts

Posted - Jul 15 2006 :  6:19:24 PM  Show Profile  Reply with Quote
my templates are separated into declaration/definition files which may be a reason. Have to try that. Rename was triggered on the class definition in the .h file using the little (still wrong positioned and from tooltip overlayed) button. No references on the class other than the .h/.cpp file since its not used (yet - building a library). Will try some more.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Jul 16 2006 :  12:51:40 PM  Show Profile  Reply with Quote
i have just split the template class into a .h and a .cpp file, and rename still works perfectly for me. when i trigger rename i am getting the following:



i have highlighted the two file names that hold the template code. if i actually run the rename then it works perfectly for me.

off hand the only obvious answer is that VA does not know about the implementation file.
* does it have a cpp extension?
* is it currently part of your project?
* does alt-o correctly swap you between the header and implementation file?

the refactoring tooltip being overlapped by the tooltip is a known problem. personally i always use the VAssistX -> refactor menu for my refactoring triggering, but i prefer the keyboard to the mouse.

however the tooltip should not be in the wrong position. do you mean it is under the tooltip, or is there some other position problem?

out of interest, what are you putting in you #include lines when you use these templates? i can only get a template split into two files to compile if i #include the cpp file.

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

bugfix
Tomato Guru

Germany
324 Posts

Posted - Jul 16 2006 :  1:01:54 PM  Show Profile  Reply with Quote
quote:
Originally posted by feline
i can only get a template split into two files to compile if i #include the cpp file.


I think you wanted to say link, don't you?:)

http://www.mf-sd.de
Go to Top of Page

jpizzi
Tomato Guru

USA
642 Posts

Posted - Jul 18 2006 :  01:46:45 AM  Show Profile  Reply with Quote
quote:
Originally posted by feline
however the tooltip should not be in the wrong position. do you mean it is under the tooltip, or is there some other position problem?


I think he is referring to case=1402.

Joe Pizzi
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Jul 18 2006 :  7:20:13 PM  Show Profile  Reply with Quote
quote:
Originally posted by bugfix

I think you wanted to say link, don't you?:)



*bah* isn't it about time both VA and my web browser learned to just do what i wanted, rather than what i typed? :)

jpizzi that would make sense (sideways scrolling in the IDE offsets the refactoring tooltip), but given the odd effects Uniwares is reporting i am wondering if something else is going on.

zen is the art of being at one with the two'ness
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