coc-java
coc-java copied to clipboard
Constructors generated by AutoValue cannot be found
Hello,
I get the following error for using constructors that were generated by AutoValue: [Java 16777218] [E] AutoValue_XXX cannot be resolved to a type
. The classes get generated into a folder called generated
somewhere in the project directory. Can we somehow point the language server to those files, so that it can resolve the classes?
This is also true when using the swagger-codegen-maven-plugin
, which generates a whole suite of classes based on an OpenAPI spec file. The classes are generated into target/generated-sources/swagger
and are also included into the final build artifact(s); however, they aren't found by JDT via this plugin
Should be fixed on recent version of coc-java, try upgrade coc.nvim to latest release and coc-java to version 1.14.0.
Try :CocCommand java.project.updateSourceAttachment.command
to attach source or :CocCommand java.project.addToSourcePath.command
to change classpath.
If you're using maven plugins, checkout https://github.com/redhat-developer/vscode-java/blob/master/document/_java.notCoveredExecution.md