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
 Change Signature on a constructor
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

smeuser
Senior Member

Germany
31 Posts

Posted - Aug 01 2007 :  10:50:05 AM  Show Profile  Reply with Quote
Hi,

if I use "Change Signature" on a constructor (declaration) and remove a parameter from it, it does not change the definition and the reference window shows all occurrences of the class name (439 in may case, whereas the constructor is used only about 15 times).
Is this intended? From the manual description I would expect that it changes the declaration as well as the definition and list me all usages of the constructor.

Thanks,

Stefan

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Aug 01 2007 :  11:35:08 AM  Show Profile  Reply with Quote
I am seeing the same effect here. Thank you for the clear description.

case=7995

There is one possible complication here, people often have overloaded class constructors. Currently Change Signature does not correctly handle overloaded functions, since VA does not know which overload you are working on. The same effect shows up with alt-g.

However this also fails when there are no overloads, and just a single constructor.

The Find References after Change Signature is sort of by design. To be honest this is an edge case. Since the constructor, especially if you have a copy constructor, can be used as an overloaded operator we do not currently try to locate all instances where the constructor is used. This is the reason we have disabled some refactoring operations on overloaded operators, there were to many ways to confuse VA and get the wrong result.

So here VA is doing a find for the class name, which is something

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

smeuser
Senior Member

Germany
31 Posts

Posted - Aug 01 2007 :  11:49:30 AM  Show Profile  Reply with Quote
Okay, just in this single special case the "Find Reference" function was not helpful (searching through list of over 400 entries in over 70 files for 15 constructors). But it's clear, that there are limits to what can easily be achieved and these are things which at least I do not very often.

ciao,

Stefan
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Aug 01 2007 :  12:05:10 PM  Show Profile  Reply with Quote
That's quite a few references!

Alt-g should still work for you in this case, and move you between the declaration and the implementation.

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