Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 1531: Rename Reference

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
khb Posted - Aug 11 2006 : 07:06:25 AM
I needed to duplicate some code an tried to rename the variables in the copy. After duplicating the code I had something like:
int aaa;
aaa = 0;

int aaa;
aaa = 0;
Then I modified the third line to:
int aaab;
Next I chose "Rename Reference from aaa to aaab" from the refactoring menu. As result I got:
int aaab;
aaab = 0;

int aaab;
aaab = 0;
Instead, I somehow expected to get:
int aaa;
aaa = 0;

int aaab;
aaab = 0;
I know that I'm really doing something unusual here and that this may be impossible to fix. However, I just wanted to present this anyway, because I think that most users would expect the same result as I did.

Regards,
Marcus.
5   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Aug 15 2006 : 7:13:29 PM
for what it is worth i have been doing this for quite a while now, and i am still learning new things about both VA and the IDE's. there are a LOT of options and buttons to explore, so missing things is very easy
khb Posted - Aug 15 2006 : 02:16:16 AM
Yeah, I'm using CTRL-H most of the time for getting the replace dialog. But I always ignored the option "Replace in Selection"

Regards,
Marcus.
feline Posted - Aug 14 2006 : 6:25:23 PM
select the code, then CTRL-H if you prefer using the keyboard
khb Posted - Aug 14 2006 : 02:11:51 AM
Find and replace within selection sounds good. Thank you, feline!

Regards,
Marcus.
feline Posted - Aug 13 2006 : 3:56:54 PM
i have run into the same effect myself now and then. the recormended solution is to select the new code and use find and replace within this selection. alternatively you could use rename, but untick the references you do not want changed in the list of references you are given.

VA has no way of knowing that you only want to run a rename on a limited scope, and most of the time if it limited the scope of rename it would break your code.

the feature you encountered is there for when you change the name of a variable, and then decide you want to apply this renaming to all occurrences of the variable.

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