You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix usage of java.import.generatesMetadataFilesAtProjectRoot
lsp-java used to treat this as a configuration property of jdtls.
However it is not a standard lsp configuration property. Instead it
must be passed as a Java System Property on the command line invoking
jdtls. See
[JLFsUtils.java](https://github.com/eclipse-jdtls/eclipse.jdt.ls/blob/master/org.eclipse.jdt.ls.filesystem/src/org/eclipse/jdt/ls/core/internal/filesystem/JLSFsUtils.java#L192-L197)
for how this property is read. Also see
[eclipse-jdtls/eclipse.jdt.ls#1900](eclipse-jdtls/eclipse.jdt.ls#1900 (comment))
for an explanation of why this is a system property and not a regular
LSP configuration property.
Use a regular `defcustom` instead of using `lsp-defcustom` for
declaring lsp-java-import-generates-metadata-files-at-project-root.
Use this defcustom variable in `lsp-java--ls-command` to pass an
appropriate value for
`java.import.generatesMetadataFilesAtProjectRoot`.
With this change importing a Gradle-based java project into LSP will
nolonger create `.classpath`, `.settings`, and `.project` entries at
the root of the project.
0 commit comments