Found while working on #288. Ensure your Eclipse installation has JDT, Mylyn and Code Recommenders (I think Eclipse IDE for Java EE Developers have all three, but I'm not sure). Ensure that the Greclipse option "Guess the most likely parameters for method calls" is CHECKED.
Consider that code snippet:
package a
import static org.junit.Assert.*
import org.junit.After;
import org.junit.Test
final class A {
MyBean m = new MyBean()
class MyBean {
String doSomething(String a, Integer b) {
}
}
@Test final void test() {
assertNu|
}
}
Invoke content assist on | and accept assertNull(Object) from the first page of content assist (Default Proposals). The completion should be: assertNull(m). This is fine.
Now open Window | Preferences | Java | Editor | Content Assist | Advanced and UNCHECK both "Java Proposals" and "JavaProposals (Task-Focused)", but leave "Java Proposals (Code Recommenders)" checked.
Now test again the above scenario: the result of completion is: assertNull( (without the argument and with no leading closing bracket).
To get the right completion, you have to cycle through content assist pages and get to Groovy Proposals: if you accept assertNull(Object) from there, then the result completion is fine.
However, I don't think this is the right behaviour. I mean, if I'm using Java Proposals processed by Code Recommenders, I should not need the content assist pages for other Java Proposals (either Task-Focused or not). Also, assertNull(Object) is probably a Groovy proposal in any case, so I expect it to fall into the Default Proposals list in any case, and the result should be consistent in both cases (independently of the Java Proposals preferences). Another clue of this is that if the Greclipse option "Guess the most likely parameters for method calls" is UNCHECKED, the result is consistent independently of the above Java Proposals content assist configuration.
Found while working on #288. Ensure your Eclipse installation has JDT, Mylyn and Code Recommenders (I think Eclipse IDE for Java EE Developers have all three, but I'm not sure). Ensure that the Greclipse option "Guess the most likely parameters for method calls" is CHECKED.
Consider that code snippet:
Invoke content assist on | and accept
assertNull(Object)from the first page of content assist (Default Proposals). The completion should be:assertNull(m). This is fine.Now open Window | Preferences | Java | Editor | Content Assist | Advanced and UNCHECK both "Java Proposals" and "JavaProposals (Task-Focused)", but leave "Java Proposals (Code Recommenders)" checked.
Now test again the above scenario: the result of completion is:
assertNull((without the argument and with no leading closing bracket).To get the right completion, you have to cycle through content assist pages and get to Groovy Proposals: if you accept
assertNull(Object)from there, then the result completion is fine.However, I don't think this is the right behaviour. I mean, if I'm using Java Proposals processed by Code Recommenders, I should not need the content assist pages for other Java Proposals (either Task-Focused or not). Also,
assertNull(Object)is probably a Groovy proposal in any case, so I expect it to fall into the Default Proposals list in any case, and the result should be consistent in both cases (independently of the Java Proposals preferences). Another clue of this is that if the Greclipse option "Guess the most likely parameters for method calls" is UNCHECKED, the result is consistent independently of the above Java Proposals content assist configuration.