Commit fabab0e
committed
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.1 parent 4909c14 commit fabab0e
1 file changed
+12
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
131 | 137 | | |
132 | 138 | | |
133 | 139 | | |
| |||
688 | 694 | | |
689 | 695 | | |
690 | 696 | | |
691 | | - | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
692 | 702 | | |
693 | 703 | | |
694 | 704 | | |
| |||
697 | 707 | | |
698 | 708 | | |
699 | 709 | | |
| 710 | + | |
700 | 711 | | |
701 | 712 | | |
702 | 713 | | |
| |||
1582 | 1593 | | |
1583 | 1594 | | |
1584 | 1595 | | |
1585 | | - | |
1586 | | - | |
1587 | | - | |
1588 | | - | |
1589 | | - | |
1590 | | - | |
1591 | | - | |
1592 | | - | |
1593 | 1596 | | |
1594 | 1597 | | |
1595 | 1598 | | |
| |||
1841 | 1844 | | |
1842 | 1845 | | |
1843 | 1846 | | |
1844 | | - | |
1845 | | - | |
1846 | | - | |
1847 | | - | |
1848 | | - | |
1849 | | - | |
1850 | | - | |
1851 | | - | |
1852 | 1847 | | |
1853 | 1848 | | |
1854 | 1849 | | |
| |||
0 commit comments