-
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
Code assist not working in annotation when one attribute is already specified #761
Comments
This should not error out any more: @Anno(abc=false|)
void meth() {} These cases will not produce proposals without some change to parser recovery: @Anno(abc=false, |)
void meth() {} @Anno(abc=false, xyz|)
void meth() {} |
All tests for annotation attributes were done on type annotations. Due to the parser design, this does not translate well to other annotations. I'm going to try another approach and see if I can come up with something better. Also, the proposals for the constant expression "false" are from substring matches. I didn't see those in my testing. At the moment, there is no filtering within annotation attribute value completion for only constant expressions. |
- grammar allows trailing comma in annotation body, which will be error for groovyc but not eclipse compiler (maybe this can be fixed in future)
Ready to test |
Ready to test |
With 3.2.0.xx-201811200031-e48 it works better: now with |
I'll take a look at substring matches. There is likely a startsWith that needs to be replaced. As for relevant suggestions only in a given context, can you open a separate issue for that? Annotation proposals are not as evolved as statement or expression proposals. |
I confirm substring matching works with 3.2.0.xx-201811202025-e48, thank you! |
Assume you have this dependency:
compile "org.springframework:spring-tx:4.3.18.RELEASE"
Then consider the following class:
Put the cursor at "|": the following exception is produced:
Then, try this alternative scenario:
Hit ctrl+space at "|" because you need to add another attribute (like "rollbackFor"): no proper code assist is given. Neither in this case:
The text was updated successfully, but these errors were encountered: