Refactorings that work on methods should be
intelligent enough to target the current enclosing method if the caret is not in
a method name of a class that is in the project and especially if it isn't in
any method name at all.
void foo() {
MyProjectClass1 c, d;
System.out.println(c.method(d.method2(1,2),3));
}
If the caret is anywhere than method or method2,
target method foo. In particular, println is of java.io.PrintStream which is not
in the project therefore it cannot be renamed.
Jacques
