"Add Folder to Java Source Path" for Maven and Gradle projects
I have a big maven project, and there are five modules in it. In my project, one module named "common" is required by the other modules. In "common" module, I have to compile the rpc code and use these codes in other modules. But when using eclipse.jdt.ls in neovim, I couldn't find the definition of the Variable defined in generated-sources. I got response like:
// Failed to get sources. Instead, stub sources have been generated by the disassembler.
// Implementation of methods is unavailable.
package my.proto;
@blithefeng You may want to take a look at https://github.com/redhat-developer/vscode-java/issues/177
@snjeza Thanks! I tried to configure build-helper-maven-plugin and it works after compiling the dependent module.
But some projects don't use build-helper-maven-plugin, does eclipse.jdt.sl consider to provide a method like "add to project source"?
There seems to be a context menu item from the explorer menu to Add Folder to Java Source Path but it looks like we don't currently support it if the project is Maven or Gradle :
Unsupported operation. Please use pom.xml file to manage the source directories of maven project.
I'll mark this as a nice enhancement but not sure how high it would be in priorities. If m2e and buildship provide API for these it might be pretty easy to do.
https://github.com/eclipse/eclipse.jdt.ls/issues/964#issuecomment-479903286
As mentioned, would be best if m2e/buildship synced the changes back into the build files.