Closed sombriks closed 6 years ago
Did you try https://github.com/redhat-developer/vscode-java/wiki/Lombok-support for Lombok?
hi @gorkem thanks for the quick answer.
I didn't faced the lack of autocomplete for lombok augmentation, but i'll set it up.
But i think the import issue isn't related to this lack of configuration. I had that with JPA annotations before i added Lombok.
Hi @gorkem ,
i've set up lombok at settings.json as suggested but the import issue remains, see the print.
as far as i investigated, it seems related to secondary dependencies.
for example, the entire javax.persistence package comes from hibernate-jpa-2.1-api-1.0.0.Final, however i do not depend on it directy in my build.gradle. i depend on spring-boot-starter-data-jpa, and that one call hibernate-jpa to the dependency tree.
Hi again,
turns out this is not really a issue.
since vscode-java relies on eclipse configs, every time when a new dependency gets added to build.gradle, the "eclipse" task must run again.
downloaded eclipse, and the project setup where broken there too. then i ran gradle cleanEclipse and gradle eclipse and the classpath was generated again.
it's working perfectly.
From the readme:
Java:Update Project configuration (Shift+Alt+U): is available when the editor is focused on a Maven pom.xml or a Gradle file. It forces project configuration / classpath updates (eg. dependency changes or Java compilation level), according to the project build descriptor.
and the matching preference:
The following settings are supported: ... java.configuration.updateBuildConfiguration : Specifies how modifications on build files update the Java classpath/configuration. Supported values are disabled (nothing happens), interactive (asks about updating on every modification), automatic (updating is automatically triggered).
For people with the same issue: ctrl+shift+P & Clean java language server workspace
. 😉
For people with the same issue: ctrl+shift+P &
Clean java language server workspace
. 😉
This is what worked for me after spending a couple of hours to resolve this issue. Thanks @Prikalel !
This is a gradle-based project, i am developing a sample spring-boot app.
https://github.com/sombriks/gm-sample-worklog/tree/master/gm-sample-worklog-service
Every other import seems to work just fine, however javax.persistence package isn't. Lombok doesn't seems to be recognized as well.
It's strange because when i command "gradle bootRun" it works perfectly.
Environment
Steps To Reproduce