-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent Groovy completion in Default Proposals content assist if only Java Proposals (Code Recommenders) is enabled #290
Comments
Java Proposals (Code Recommenders) is a 3rd party extension to Content Assist. If a completion from that set does not work in a Groovy editor, then that project should have a look. Groovy Proposals is intended to replace Java Proposals when using a Groovy editor. So it should be safe to check both Java Proposals and Groovy Proposals in the Default Proposal Kinds list.
Because the Groovy Editor is an extension of the Java Editor, it may still be overriding some things that Java Proposals (Code Recommenders) was not tested with.
|
This however does not explain why code assist breaks only in this specific case (with "Guess the most likely parameters for method calls" CHECKED). Please also note that Code Recommenders is an official Eclipse project (http://www.eclipse.org/recommenders/) and is being part of the Eclipse release train since Juno. So it's not so much "3rd party" :-) |
Can you retest? The proposal categories from Code Recommenders (and others) should be disabled now within a Groovy Editor. I'm not sure if the preference you mentioned was the real issue. I think opening the preferences with an open Groovy editor and changing the set of proposal categories was the problem. If you do still see odd completion behavior, can you confirm if closing and reopening the Groovy editor clears it up? |
The real issue is not the mentioned property by itself, but rather the combination of that property being |
I just tried Greclipse 2.9.2.xx-201705112220-e46. So, I think the problem I reported is fixed now, thank you very much! 👍 |
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.The text was updated successfully, but these errors were encountered: