@@ -128,6 +128,12 @@ deduplication with the G1 Garbage collector"
128128 :risky t
129129 :type '(repeat string))
130130
131+ (defcustom lsp-java-import-generates-metadata-files-at-project-root nil
132+ " Specify whether the project metadata files(.project, .classpath,
133+ .factorypath, .settings/) will be generated at the project root."
134+ :risky t
135+ :type 'boolean )
136+
131137(lsp-defcustom lsp-java-errors-incomplete-classpath-severity " warning"
132138 " Specifies the severity of the message when the classpath is
133139incomplete for a Java file"
@@ -700,7 +706,11 @@ FULL specify whether full or incremental build will be performed."
700706 lsp-java-server-config-dir
701707 (lsp-file-local-name (lsp-java--locate-server-config))))
702708 (java-9-args (when (lsp-java--java-9-plus-p)
703- lsp-java-9-args)))
709+ lsp-java-9-args))
710+ (generate-metadata-property (if lsp-java-import-generates-metadata-files-at-project-root
711+ " -Djava.import.generatesMetadataFilesAtProjectRoot=true"
712+ " -Djava.import.generatesMetadataFilesAtProjectRoot=false"
713+ )))
704714 (lsp-java--ensure-dir lsp-java-workspace-dir)
705715 `(, lsp-java-java-path
706716 " -Declipse.application=org.eclipse.jdt.ls.core.id1"
@@ -709,6 +719,7 @@ FULL specify whether full or incremental build will be performed."
709719 " -Dlog.protocol=true"
710720 " -Dlog.level=ALL"
711721 ,@lsp-java-vmargs
722+ , generate-metadata-property
712723 " -jar"
713724 , server-jar
714725 " -configuration"
@@ -1594,14 +1605,6 @@ data. Beyond this limit, cached workspace data may be removed."
15941605 :type '(repeat nil )
15951606 :lsp-path " java.configuration.workspaceCacheLimit" )
15961607
1597- (lsp-defcustom lsp-java-import-generates-metadata-files-at-project-root nil
1598- " Specify whether the project metadata files(.project, .classpath,
1599- .factorypath, .settings/) will be generated at the project root.
1600- Click [HERE](command:_java.metadataFilesGeneration) to learn how
1601- to change the setting to make it take effect."
1602- :type 'boolean
1603- :lsp-path " java.import.generatesMetadataFilesAtProjectRoot" )
1604-
16051608(lsp-defcustom lsp-java-project-output-path " "
16061609 " A relative path to the workspace where stores the compiled
16071610output. `Only` effective in the `WORKSPACE` scope. The setting
0 commit comments