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
The Initialize Request section of the "Running the JAVA LS server from the command line" wiki page describes the InitializationOptions.settings property as an array of JavaConfigurationSettings:
interfaceInitializationOptions{
...
/** * Java LS configuration settings */settings?: JavaConfigurationSettings[];}
However, an example given later in that section shows settings as a single JavaConfigurationSettings instance, not an array of multiple JavaConfigurationSettings instances:
In practice, I find that when I pass settings as an array of one JavaConfigurationSettings instance, its value is ignored. Conversely, if I pass settings directly as a single JavaConfigurationSettings instance, its value is used.
This line of code from the server's implementation also suggests that settings is expected to be a dictionary, not an array:
if (initializationOptions.get(SETTINGS_KEY) instanceofMap<?, ?> settings) {
Therefore, I believe that the documentation's declaration of interface InitializationOptions is incorrect. The value of the InitializationOptions.settings property should be a single JavaConfigurationSettings instance, not an array of JavaConfigurationSettings instances, as in:
interfaceInitializationOptions{
...
/** * Java LS configuration settings */settings?: JavaConfigurationSettings;}
The text was updated successfully, but these errors were encountered:
The Initialize Request section of the "Running the JAVA LS server from the command line" wiki page describes the
InitializationOptions.settings
property as an array ofJavaConfigurationSettings
:However, an example given later in that section shows
settings
as a singleJavaConfigurationSettings
instance, not an array of multipleJavaConfigurationSettings
instances:In practice, I find that when I pass
settings
as an array of oneJavaConfigurationSettings
instance, its value is ignored. Conversely, if I passsettings
directly as a singleJavaConfigurationSettings
instance, its value is used.This line of code from the server's implementation also suggests that
settings
is expected to be a dictionary, not an array:eclipse.jdt.ls/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/handlers/BaseInitHandler.java
Line 116 in 365d396
Therefore, I believe that the documentation's declaration of
interface InitializationOptions
is incorrect. The value of theInitializationOptions.settings
property should be a singleJavaConfigurationSettings
instance, not an array ofJavaConfigurationSettings
instances, as in:The text was updated successfully, but these errors were encountered: