Found while verifying #367.
Consider the following Java enum:
package b;
public enum MyEnum {
VAL1, VAL2, VAL3;
}
the following Java class:
package b;
public class Utility {
public static void doSomething(MyEnum enumValue) {
}
}
and the following Groovy class:
package b
class Test4 {
void doSomething() {
Utility.doSom|
}
}
Consider these options in Java | Editor | Content assist:
- Completion overwrites CHECKED
- Use static imports UNCHECKED
- Fill method arguments and show guessed arguments CHECKED
- Insert best guessed arguments CHECKED
Invoke code assist at "|": you'll get Utility.doSomething(VAL3) (VAL3 highlighted) and then choose VAL1. The result is: Utility.doSomething(MyEnum.VAL3VAL1).
If "Use static imports" is CHECKED, the result, instead, is: Utility.doSomething(VAL3VAL1) (the added static import is correct, though).
The problem doesn't happen if you check "Completion inserts" instead of "Completion overwrites".
Found while verifying #367.
Consider the following Java enum:
the following Java class:
and the following Groovy class:
Consider these options in Java | Editor | Content assist:
Invoke code assist at "|": you'll get
Utility.doSomething(VAL3)(VAL3highlighted) and then chooseVAL1. The result is:Utility.doSomething(MyEnum.VAL3VAL1).If "Use static imports" is CHECKED, the result, instead, is:
Utility.doSomething(VAL3VAL1)(the added static import is correct, though).The problem doesn't happen if you check "Completion inserts" instead of "Completion overwrites".