Skip to content
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

Problems during content assist (only happens with '@') #780

Closed
seongbin9786 opened this issue Dec 21, 2018 · 4 comments
Closed

Problems during content assist (only happens with '@') #780

seongbin9786 opened this issue Dec 21, 2018 · 4 comments

Comments

@seongbin9786
Copy link

seongbin9786 commented Dec 21, 2018

Related Issue

#209

Environment

  • OS: Windows 10 x64
  • IDE: Spring Tool Suite 4 (4.0.2 RELEASE + it says there's nothing to update)
  • Spring Boot with Maven
  • Spock

Symptoms

  1. Type @ around class/method/field/...
  2. Type Ctrl + Space (it's a shortcut for Auto Complete)
  3. Stops for a bit (>= 5 sec)
  4. Error Prompt pops up
  5. Click 'OK' button then panel is still activated (picture below)
    • it works fine while the panel is open

It doesnt happen when..

  1. Type @ with one or more letter

    • LIKE:
      • @W - suggestion works normally - such as WebMvcTest
      • @D - suggestion works normally - such as DataJpaTest
  2. Or Type anything other than @

    • works perfectly fine

The error prompt

prompt

Suggestion panel after the prompt closed

panel

@eric-milles
Copy link
Member

What version of Groovy Development Tools do you have? If you scroll down in the proposals are there annotations proposed? I think it is just taking some time to process your classpath.

@seongbin9786
Copy link
Author

Thanks for your response :)

  1. Groovy Development Tools 3.2.0.SNAPSHOT
  2. Groovy 2.5.4 (packed within spock-core-1.2-groovy-2.5)

Annotations are proposed as expected:
image

Loading suggestions takes too much time therefore the error prompt pops up quite often 😢

@eric-milles
Copy link
Member

eric-milles commented Dec 22, 2018

Some background information for any interested parties: Groovy cannot satisfy this request from the Java annotations index alone. Groovy annotation collector types like @Canonical and @CompileDynamic are compiled to regular classes from Java's perspective. So, the Groovy completion processor needs to examine all classes to determine if any are annotation collectors. In a project with many dependencies, this can take some time.

With some prefix character(s), the names index can cut down the number of types that must be examined quite a bit and so you should experience "normal" responsiveness in that case.

@seongbin9786
Copy link
Author

Awesome! Thank you very much 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants