Replacing same variable multiple time in a for statement [message #656817] |
Mon, 28 February 2011 12:37  |
Eclipse User |
|
|
|
Hello:
I want to change or replace the same variable all at once in the same line or
same scope within a pair of braces, how do I do it all at once?
I could use Find /Replace, but there is problems associate with replace.
Here is an example:
for (int i = 0; i < actual.length; i++)
If I do a Find /Replace of "i" with Z, for example, then I would get this:
for ( Znt Z = 0; Z < actual.length; Z++)
// other codes here that needs replacement of "i"
the error is Znt, which should be int.
So, there should be a way for me to select multiple lines
and then invoke auto replace of I with "Z" without
changing other variables that has "i" in the name or etc...
Something similar auto replace after invoking Ctrl Space to insert a template.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.07216 seconds