coc-java icon indicating copy to clipboard operation
coc-java copied to clipboard

Constructors generated by AutoValue cannot be found

Open ozeidan opened this issue 5 years ago • 1 comments

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?

ozeidan avatar Sep 16 '19 15:09 ozeidan

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

cbcoutinho avatar Oct 10 '20 19:10 cbcoutinho

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.

chemzqm avatar Jan 29 '23 06:01 chemzqm

If you're using maven plugins, checkout https://github.com/redhat-developer/vscode-java/blob/master/document/_java.notCoveredExecution.md

chemzqm avatar Jan 29 '23 09:01 chemzqm