-
Notifications
You must be signed in to change notification settings - Fork 82
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
Add xml.java.home preference #147
Conversation
package.json
Outdated
"string", | ||
"null" | ||
], | ||
"default": null |
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.
"description": "Specifies the folder path to the JDK (8 or more recent) used to launch the XML Language Server.\nOn Windows, backslashes must be escaped, i.e.\n"xml.java.home":"C:\\Program Files\\Java\\jdk1.8.0_161"",
"scope":"window"
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.
I have added these new settings.
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.
Looks good to me, tested it with all the options.
You also need to update https://github.com/redhat-developer/vscode-xml/blob/master/README.md#requirements and https://github.com/redhat-developer/vscode-xml/blob/master/README.md#supported-vs-code-settings (remove 0.6.0, add 0.7.0 note) |
@fbricon Updated |
README.md
Outdated
Since 0.6.0: | ||
* `xml.format.preservedNewLines`: Set the maximum amount of newlines between elements. Defaults to `2`. | ||
Since 0.7.0: | ||
* `xml.java.home`: Set the Java path required to run the XML Language Server. If not set, fallback to either `java.home` or the `JAVA_HOME` or `JDK_HOME` environment variables. |
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.
is it falls back or fallbacks?
to either the java.home
preference, or the JAVA_HOME
or JDK_HOME
environment variables
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.
@fbricon Updated to "falls back"
Signed-off-by: David Kwon <dakwon@redhat.com>
Fixes #145
This change will check for the
xml.java.home
preference before checking thejava.home
preference.I also cleaned up
checkJavaRuntime()
inrequirements.ts
to make it a bit more readable.Please let me know if I should revert it to match the previous design.
Signed-off-by: David Kwon dakwon@redhat.com