Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Bulk Rename - using wildcards

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
Reticulatas Posted - Sep 13 2018 : 2:03:25 PM
I have this code:


bool something;
int foo;
someClass obj;


I do this:


struct State
{
  bool something;
  int foo;
  someClass obj;
};
State state;


I now want have to go do a VA rename for all uses of the members, renaming them like:
before: something
after: state.something

I have to do this for each field individually. It would be nice to have a bulk rename that could perform operations like this automatically.

When you rename, perhaps the wildcard operator could be used to signify where in the rename the original symbol is placed.
2   L A T E S T    R E P L I E S    (Newest First)
Reticulatas Posted - Sep 14 2018 : 1:08:54 PM
I agree, I realize having a general purpose utility for this would open a can of worms regarding how to handle bulk text manipulation. The specific case of "Encapsulate Fields" is more readily applicable.
accord Posted - Sep 13 2018 : 3:22:17 PM
Thank you for the idea. I have put in a feature request for this:

case=119232

I imagine this to be a refactoring to move variables to class / struct via an object.
I also mentioned your approach.
My idea is to pick an object in scope, and VA would move the selected variables to its struct or class.

So you would begin with something like:

bool something;
int foo;
someClass obj;


struct State
{
};
State state;

in this case, but the command would be more general, applicable to classes and struct that already has members in them.

What do you think?

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