Open apupier opened 3 years ago
AFAIK vscode doesn't watch files outside the current workspace, so doesn't emit file change events.
How/why does a user modify the contents of redhat.vscode-camelk/java-dependencies-3.7.0/dependencies/?
How/why does a user modify the contents of redhat.vscode-camelk/java-dependencies-3.7.0/dependencies/?
VS Code Camel K is modifying it. The goal is to modify the content depending on the opened java file and also when the file is modified. If there is an API to tell the Java language Server to refresh the classpath/re-read the folder that woudl be fine.
AFAIK vscode doesn't watch files outside the current workspace, so doesn't emit file change events.
Maybe I can send a file change event programmatically even if outside the workspace? if yes, will the java language server refresh the classpath?
VS Code Camel K is modifying it. The goal is to modify the content depending on the opened java file and also when the file is modified. If there is an API to tell the Java language Server to refresh the classpath/re-read the folder that woudl be fine.
Wow that seems wrong ;-) If you have 2 opened Camel K files in 2 different windows, who wins?
Maybe I can send a file change event programmatically even if outside the workspace? if yes, will the java language server refresh the classpath?
I don't know. Maybe. Maybe not.
VS Code Camel K is modifying it. The goal is to modify the content depending on the opened java file and also when the file is modified. If there is an API to tell the Java language Server to refresh the classpath/re-read the folder that woudl be fine.
Wow that seems wrong ;-) If you have 2 opened Camel K files in 2 different windows, who wins?
Agree that it is not optimal. But rebuilding a project support cannot be done in a single step easily. The plan for this iteration is to ask user to refresh classpath manually so the user is choosing which he/she is interesting in and wins. Having a different folder per Camel K files will solve the problem when switchign between files but still won't refresh the classpath on modification of the file, or on call of the Camel K dependencies refresh command. Also, until symbolic link is nto implemented on Camel K side https://github.com/apache/camel-k/issues/2179 , users that have a lot of files will require a lot of hard disk space.
maybe can try to call "compile" command: https://github.com/redhat-developer/vscode-java/blob/9f32875a67352487f5c414bb7fef04c9b00af89d/src/standardLanguageClient.ts#L319
Environment
Steps To Reproduce
/home/apupier/.config/Code/User/globalStorage/redhat.vscode-camelk/java-dependencies-3.7.0/dependencies/
[Please attach a sample project reproducing the error] Please attach logs
Current Result
the classpath is not refreshed.
Expected Result
Either:
Additional Informations
any light workaround for it? (or already existing API?)
heavy workarounds:
needed for VS Code Camel K https://issues.redhat.com/browse/FUSETOOLS2-826