Allow support of standalone java files in subfolders
See original GitHub issueI have a use case a bit particular for VS Code java related VS Code Camel K.
Apache Camel K is using standalone java files.
VS Code Camel K is downloading the required dependencies and providing them through the java.referencedLibraries setting of VS Code Java.
it works great for standalone Java files which are at the root of the workspace.
The Apache Camel K examples folders (here and here) is providing a lot of examples, including some that are contained in a specific subfolder.
VS Code Java is reporting error complaining that The declared package "" does not match the expected package "<thefoldername>"
would it be possible to import each subfolder as an invisible project?
Environment
- Operating System:
- JDK version:
- Visual Studio Code version:
- Java extension version:
Steps To Reproduce
- install VS Code Camel K extension
- install Language support for java
- clone https://github.com/apache/camel-k
- open
examples
folder in VS Code instance - open one of the java file
–> there is error
The declared package "" does not match the expected package "<thefoldername>"
–> note that there are also errors due to missing dependencies which are a problem at VS code Camel K and not at VS Code Java at all
[Please attach a sample project reproducing the error] Please attach logs
Current Result
Expected Result
Additional Informations
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (4 by maintainers)
@apupier Would you mind have a try and let us know if this solves your problem?
The command
Java: Configure Classpath
should somehow mitigate the problem