How do I rename a variable (NetBeans)
From C++ to PHP, debugging to webhosting; help and discussion about writing your latest program to running your website. NOT for help when your PC won't work.
| Announcements | Posted on | |
|---|---|---|
| TSR launches Learn Together! - Our new subscription to help improve your learning | 16-05-2013 | |
-
Re: How do I rename a variable (NetBeans)I know that but will it change every appearance of the variable name to the new name even in other classes?(Original post by iCiaran)
Select the variable, right click then go to Refactor>rename, should work fine... -
Re: How do I rename a variable (NetBeans)It should, I haven't used NetBeans before so I can't say for certain, it should definitely do it in the class you select it in, you may have do it in each class though...(Original post by Prokaryotic_crap)
I know that but will it change every appearance of the variable name to the new name even in other classes?
On a side note, are you really using the exact same variable in multiple classes? Or just variables called the same thing? -
Re: How do I rename a variable (NetBeans)I know it works when you do it on the class you select it from, I've done it before, but I don't know if it works on all classes that use the variable and I don't want to do it on every single class that uses it because my project is quite bug and complex with many classes.(Original post by iCiaran)
It should, I haven't used NetBeans before so I can't say for certain, it should definitely do it in the class you select it in, you may have do it in each class though...
yes, I'm using the exact variable in multiple classes.(Original post by iCiaran)
On a side note, are you really using the exact same variable in multiple classes? -
Re: How do I rename a variable (NetBeans)I'm not?(Original post by Planto)
Why do you need to store the same information twice?
e.g. I have a variable x and getter and setter methods for it and I want to change x but other classes are using its setter and getter methods.