-
Notifications
You must be signed in to change notification settings - Fork 193
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 list of suggestions when trying to complete List.with #411
Comments
I am not getting |
Yes, I still reproduce with 3.0.0.xx-201801162243-e47. |
Can you share what content assist options you have enabled/disabled (Groovy and Java)? This behavior must be tied to one of the settings.
|
For Groovy, just "Use closure literals for closure arguments" is checked. In Java | Editor | Content Assist | Advanced I have the following proposal kinds checked: API Tools, Basic, Groovy, Groovy Template, Jar, Java (Code Recommenders) (just this for Java Proposals!), JPA, No Prefix Constructor Completions, Spring Annotation, SWT Template, Template. |
Same behaviour if I uncheck Java (Code Recommenders) proposal kind and check Java instead. |
Got it: I don't see "eachWithIndex" if I uncheck the option: Java | Editor | Content Assist | Show substring matches. |
Thanks. I'll have a look with that setting enabled -- I think it is somewhat recent. And I'll try to add some tests with it on.
|
I'm not sure what to do with this issue report. |
But doesn't a resorting occur after each typing? Tomorrow I'll try to see what happens with Java |
I just tested with a Java class and JDT: package test17;
import org.codehaus.groovy.runtime.DefaultGroovyMethods;
public class Test17J {
public void foo () {
DefaultGroovyMethods.|
}
} When you invoke code assist at "|", a long list appears, showing various |
Please see my comment in #461 about another effect of the suggestion list not being recomputed on each key type. If here the problem seems to be a missing resorting of suggestions (which causes a suboptimal code assist experience and a high rate of typing errors), in that case it even causes a missing suggestion. On my daily work experience, I don't know which of these two cases is the most annoying. :-( |
Hi Eric, no milestone at all set for this and #477? :-( |
@mauromol I haven't looked into this or 477; if I had a plan of attack I would set a milestone. I haven't been marking content assist as Help Wanted since I have a pretty good handle on that part of the code. Much time has been spent trying to keep up with new Java, Groovy, and Eclipse releases. They have picked up the pace in the last few months. |
Sure, you did a great work, really! I just asked for the lack of a milestone here because these two bugs are still on the top list of the most annoying bugs for me ;-) |
Substring matching was not supported for completion with a prefix pattern. That is why there was an inconsistency seen for "list." vs "list.wi". I have a change to enable support for the substring matching preference. With that, "eachWithIndex" will appear in both lists. Sorting to get "with" to display before "eachWithIndex" is the next step. |
Ready to test |
Great work, seems to be perfect now with 3.1.0.xx-201808130148-e47, thank you! 👍 I think this is a huge improvement in a Groovy developer daily experience! |
Consider the following:
Now, suppose the cursor is at "|" and start to type "." (dot): the code assist suggestion list is shown. Start to type "wi" and look at the suggestion list:
eachWithIndex(Closure)
is shown beforewith(Closure)
. This is unexpected and it's the cause of a lot of typing errors while coding.In particular, see the difference when starting code assist in these different ways:
new List().|
(and then type "wi")vs
new List().wi|
In the second case
eachWithIndex(Closure)
is not even shown!The text was updated successfully, but these errors were encountered: