Consider the Groovy class:
package test4
class MyBean {
String foo
}
and the following:
package test5
class MyBean {
int bar
}
(please note: two classes with the same name in different packages)
Then the following:
package test5
class TestCompletion {
void doSomething() {
new MyB|
}
}
(please note: same package as the second MyBean class).
Invoke code assist at "|" and choose test4.MyBean(): the constructor invocation is completed, but no import statement is added, hence the class being constructed is indeed test5.MyBean instead of test4.MyBean.
Consider the Groovy class:
and the following:
(please note: two classes with the same name in different packages)
Then the following:
(please note: same package as the second
MyBeanclass).Invoke code assist at "|" and choose
test4.MyBean(): the constructor invocation is completed, but no import statement is added, hence the class being constructed is indeedtest5.MyBeaninstead oftest4.MyBean.