diff --git a/org.eclipse.lsp4e/src/org/eclipse/lsp4e/LanguageClientImpl.java b/org.eclipse.lsp4e/src/org/eclipse/lsp4e/LanguageClientImpl.java index ff86948a9..cc8395636 100644 --- a/org.eclipse.lsp4e/src/org/eclipse/lsp4e/LanguageClientImpl.java +++ b/org.eclipse.lsp4e/src/org/eclipse/lsp4e/LanguageClientImpl.java @@ -13,6 +13,7 @@ *******************************************************************************/ package org.eclipse.lsp4e; +import static org.eclipse.lsp4e.internal.NullSafetyHelper.castNonNull; import static org.eclipse.lsp4e.internal.NullSafetyHelper.lateNonNull; import java.util.ArrayList; @@ -33,6 +34,7 @@ import org.eclipse.lsp4e.ui.UI; import org.eclipse.lsp4j.ApplyWorkspaceEditParams; import org.eclipse.lsp4j.ApplyWorkspaceEditResponse; +import org.eclipse.lsp4j.ConfigurationItem; import org.eclipse.lsp4j.ConfigurationParams; import org.eclipse.lsp4j.Location; import org.eclipse.lsp4j.MessageActionItem; @@ -75,14 +77,18 @@ protected final LanguageServer getLanguageServer() { @Override public CompletableFuture> configuration(ConfigurationParams configurationParams) { - // override as needed List<@Nullable Object> list = new ArrayList<>(configurationParams.getItems().size()); - for (int i = 0; i < configurationParams.getItems().size(); i++) { - list.add(null); + for (ConfigurationItem item: configurationParams.getItems()) { + list.add(getConfigurationItem(castNonNull(item))); } return CompletableFuture.completedFuture(list); } + // override as needed + protected @Nullable Object getConfigurationItem(ConfigurationItem item) { + return null; + } + @Override public void telemetryEvent(@Nullable Object object) { // TODO