Skip to content
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

Fix usage of java.import.generatesMetadataFilesAtProjectRoot #482

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 12 additions & 17 deletions lsp-java.el
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,12 @@ deduplication with the G1 Garbage collector"
:risky t
:type '(repeat string))

(defcustom lsp-java-import-generates-metadata-files-at-project-root nil
"Specify whether the project metadata files(.project, .classpath,
.factorypath, .settings/) will be generated at the project root."
:risky t
:type 'boolean)

(lsp-defcustom lsp-java-errors-incomplete-classpath-severity "warning"
"Specifies the severity of the message when the classpath is
incomplete for a Java file"
Expand Down Expand Up @@ -688,7 +694,11 @@ FULL specify whether full or incremental build will be performed."
lsp-java-server-config-dir
(lsp-file-local-name (lsp-java--locate-server-config))))
(java-9-args (when (lsp-java--java-9-plus-p)
lsp-java-9-args)))
lsp-java-9-args))
(generate-metadata-property (if lsp-java-import-generates-metadata-files-at-project-root
"-Djava.import.generatesMetadataFilesAtProjectRoot=true"
"-Djava.import.generatesMetadataFilesAtProjectRoot=false"
)))
(lsp-java--ensure-dir lsp-java-workspace-dir)
`(,lsp-java-java-path
"-Declipse.application=org.eclipse.jdt.ls.core.id1"
Expand All @@ -697,6 +707,7 @@ FULL specify whether full or incremental build will be performed."
"-Dlog.protocol=true"
"-Dlog.level=ALL"
,@lsp-java-vmargs
,generate-metadata-property
"-jar"
,server-jar
"-configuration"
Expand Down Expand Up @@ -1582,14 +1593,6 @@ data. Beyond this limit, cached workspace data may be removed."
:type '(repeat nil)
:lsp-path "java.configuration.workspaceCacheLimit")

(lsp-defcustom lsp-java-import-generates-metadata-files-at-project-root nil
"Specify whether the project metadata files(.project, .classpath,
.factorypath, .settings/) will be generated at the project root.
Click [HERE](command:_java.metadataFilesGeneration) to learn how
to change the setting to make it take effect."
:type 'boolean
:lsp-path "java.import.generatesMetadataFilesAtProjectRoot")

(lsp-defcustom lsp-java-project-output-path ""
"A relative path to the workspace where stores the compiled
output. `Only` effective in the `WORKSPACE` scope. The setting
Expand Down Expand Up @@ -1841,14 +1844,6 @@ Beyond this limit, cached workspace data may be removed."
:type '(repeat nil)
:lsp-path "java.configuration.workspaceCacheLimit")

(lsp-defcustom lsp-java-import-generates-metadata-files-at-project-root nil
"Specify whether the project metadata files(.project, .classpath,
.factorypath, .settings/) will be generated at the project root.
Click [HERE](command:_java.metadataFilesGeneration) to learn how to change the
setting to make it take effect."
:type 'boolean
:lsp-path "java.import.generatesMetadataFilesAtProjectRoot")

(lsp-defcustom lsp-java-project-output-path ""
"A relative path to the workspace where stores the compiled output.
`Only` effective in the `WORKSPACE` scope. The setting will `NOT` affect
Expand Down