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
 Refactor doesn't work on overloaded functions
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

erik9631
New Member

Slovakia
3 Posts

Posted - May 01 2022 :  6:38:25 PM  Show Profile  Reply with Quote
Hello.
I tried the trial version of visual assist and I was mostly satisfied.
However I ran into a problem where visual assist would not allow me to use any of the refactoring tools on class methods that are overloaded.
Is this a missing feature or was there something broken?


In addition to this, I would also like to ask whether visual assist has a support for moving a class into a new namespace.

These features are crucial for my large code base and I will be basing my decision on migrating to this product based on that.

Currently using Clion that has support for the things mentioned above but it is painfully slow sometimes.

Thanks for the answer in advance.

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - May 02 2022 :  07:25:24 AM  Show Profile  Reply with Quote
Can you please place the keyboard caret into one of these overloaded function names and press Alt-Shift-Q, which should bring up VA's refactoring context menu, which will list the available refactorings that you can trigger on the function.

You should be offered:

Rename
Add Similar Member
Document Method
Modify Expression
Find References
Find References in File

are you seeing any of these? We don't currently offer Change Signature on overloaded functions, but this is something we are looking to add. It's just tricky since you have to work out which overload is being called in each place where the function is called:

case=2164

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

erik9631
New Member

Slovakia
3 Posts

Posted - May 02 2022 :  1:53:59 PM  Show Profile  Reply with Quote
Correct.
I am seeing all of these. Change signature is what I was hoping to use.

Is there any approximation when should I expect this feature to be implemented?

Do you know of any alternative ways I could do change signature on such function? I have a very large code base and manually replacing the function is out of the question. It would take too much time.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - May 03 2022 :  07:51:30 AM  Show Profile  Reply with Quote
What sort of Change Signature are you looking to do? Reordering parameters, removing parameters, adding parameters, changing the function name or return type?

Renaming the function is already available, so I assume that isn't what you are looking for.
For adding parameters, unless you are adding a parameter at the end with a default value you will have to manually update all of the function calls anyway, since VA won't be able to add a valid and sensible parameter automatically.

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

erik9631
New Member

Slovakia
3 Posts

Posted - May 05 2022 :  10:09:10 AM  Show Profile  Reply with Quote
The case I am looking for is refactoring the return types of overloaded class methods.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - May 06 2022 :  06:16:03 AM  Show Profile  Reply with Quote
If you mean changing the return type of the method, then in this case Change Signature won't really help you, since it will let you change the return type, but VA cannot then update any of your code, since we won't know what changes to make. So you will get the same result by simply changing the return type at the function declaration and then doing a Find References on the function.

In the Find References Results window you can use CTRL-F to search the results list, in case this will help you locate the references to the overload you are updating.

You can also use Delete to remove entries from the results list, as you scroll through it, letting you trim the list down to focus on just the entries that you want to jump to and update.

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