New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stop generating metadata files at project's root #1900
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Signed-off-by: Sheng Chen <sheche@microsoft.com>
Signed-off-by: Sheng Chen <sheche@microsoft.com>
org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/filesystem/JdtlsFile.java
Outdated
Show resolved
Hide resolved
org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/filesystem/JdtlsFile.java
Outdated
Show resolved
Hide resolved
org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/filesystem/JdtlsFile.java
Outdated
Show resolved
Hide resolved
org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/filesystem/JdtlsFile.java
Outdated
Show resolved
Hide resolved
org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/filesystem/JdtlsFsUtils.java
Outdated
Show resolved
Hide resolved
org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/filesystem/JdtlsFsUtils.java
Outdated
Show resolved
Hide resolved
org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/filesystem/JdtlsFsUtils.java
Outdated
Show resolved
Hide resolved
org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/filesystem/JdtlsFile.java
Outdated
Show resolved
Hide resolved
org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/filesystem/JdtlsFileSystem.java
Outdated
Show resolved
Hide resolved
org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/filesystem/JdtlsFsUtils.java
Outdated
Show resolved
Hide resolved
Signed-off-by: sheche <sheche@microsoft.com>
org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/filesystem/JLSFile.java
Show resolved
Hide resolved
org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/filesystem/JLSFile.java
Outdated
Show resolved
Hide resolved
org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/filesystem/JLSFileSystem.java
Show resolved
Hide resolved
org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/filesystem/JLSFile.java
Outdated
Show resolved
Hide resolved
org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/filesystem/JLSFsUtils.java
Outdated
Show resolved
Hide resolved
org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/filesystem/JLSFileSystem.java
Show resolved
Hide resolved
Signed-off-by: sheche <sheche@microsoft.com>
Signed-off-by: sheche <sheche@microsoft.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change is working well for me. Played around with java.settings.url
outside workspace, and within, and couldn't see any breakage.
org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/filesystem/JLSFile.java
Outdated
Show resolved
Hide resolved
org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/filesystem/JLSFsUtils.java
Show resolved
Hide resolved
That's currently a system property. It should be more configurable. We have a large source code base which is modified by many different editors/IDEs. This change would break VS Code users unless the setting is detected somehow at startup/during import. |
@guw Because the file system contribution will take effect at very begin before the server and client start communication via LSP. So it is a system property instead of a preference. I don't think the change will break the users because we considered the compatibility in implementation:
In the code base you mentioned:
If in your implementation, you want to deal with those metadata files. You can use the standard API to do it. For example if you want to update the project nature, use: If you do want to get the file instance of the metadata files, for example, for the |
Signed-off-by: Sheng Chen <sheche@microsoft.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Have a try, it works with Maven/Gradle/Invisible project.
Feel free to combine the commits and merge when ready. |
resolve redhat-developer/vscode-java#618, requires redhat-developer/vscode-java#2153
There is a setting called
java.import.generatesMetadataFilesAtProjectRoot
to control whether the project metadata files will be generated at project root. By default it'sfalse
, meaning those files will be hidden.Some known issues I found:
1. Buildship hard code the.settings/
folder location: eclipse/buildship#11112. When calling .getLocation() from the metadata file(i.e.
project.getFile(".project").getLocation()
), the file location always points to the project root. This is because the upstream implementation does not depend onFileStore
to resolve the location, seeFileSystemResourceManager#locationFor()
. ButgetLocationURI()
works fine.Signed-off-by: Sheng Chen sheche@microsoft.com