Fix NPE in STS4LanguageClient related to classpath infra

Also improve test coverage around this breakage. And
improve the debugability of the tests by improving how
they log configure logger.
This commit is contained in:
Kris De Volder
2018-05-11 12:31:03 -07:00
parent 27551f6762
commit b3a61025a5
12 changed files with 258 additions and 120 deletions

View File

@@ -41,6 +41,7 @@ import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.progress.UIJob;
import org.eclipse.ui.texteditor.AbstractTextEditor;
import org.springframework.tooling.jdt.ls.commons.Logger;
import org.springframework.tooling.jdt.ls.commons.classpath.ReusableClasspathListenerHandler;
import com.google.common.collect.ImmutableList;
@@ -49,8 +50,10 @@ import com.google.common.collect.ImmutableMap;
@SuppressWarnings("restriction")
public class STS4LanguageClientImpl extends LanguageClientImpl implements STS4LanguageClient {
private static ReusableClasspathListenerHandler classpathService = new ReusableClasspathListenerHandler(new LSP4ECommandExecutor());
private static ReusableClasspathListenerHandler classpathService = new ReusableClasspathListenerHandler(
Logger.forEclipsePlugin(LanguageServerCommonsActivator::getInstance),
new LSP4ECommandExecutor()
);
public STS4LanguageClientImpl() {
System.out.println("Instantiatin STS4LanguageClientImpl");