Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Change Signature on a constructor

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
smeuser Posted - Aug 01 2007 : 10:50:05 AM
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
3   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Aug 01 2007 : 12:05:10 PM
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.
smeuser Posted - Aug 01 2007 : 11:49:30 AM
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
feline Posted - Aug 01 2007 : 11:35:08 AM
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

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