You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importjava.io.ByteArrayInputStream;
importjava.io.IOException;
/** * In is common in English text. */classTest {
voidrun() throwsIOException {
try(varin = newByteArrayInputStream(newbyte[0])) {
in.read();
}
}
}
Now if I rename the in variable in the try statement, the in in the class' Javadoc is also renamed. I can see how updating comments as well can be useful, but then the extension should figure out which occurrences refer to the replaced variable and which don't (which, in the general case, would be extremely hard to determine). For example in this case, I'm renaming a local variable, so I'd never refer to it in the class' Javadoc.
The text was updated successfully, but these errors were encountered:
I ran into this as well, but only occurrences in the comment on the current method were affected. My workaround: temporarily detach the Javadoc comment from the method by inserting a field declaration, rename the variable, remove the dummy field.
/**
* Method comment, containing the word "name".
*/
int dummy;
void func() {
int name = 0; // now I can rename `name` without affecting the word in the comment.
}
Consider the following code:
Now if I rename the
in
variable in the try statement, thein
in the class' Javadoc is also renamed. I can see how updating comments as well can be useful, but then the extension should figure out which occurrences refer to the replaced variable and which don't (which, in the general case, would be extremely hard to determine). For example in this case, I'm renaming a local variable, so I'd never refer to it in the class' Javadoc.The text was updated successfully, but these errors were encountered: