adapt to newer version of lsp4e and changed API around capability checks
This commit is contained in:
@@ -5,7 +5,7 @@ Bundle-SymbolicName: org.springframework.tooling.ls.eclipse.gotosymbol;singleton
|
||||
Bundle-Version: 4.12.0.qualifier
|
||||
Require-Bundle: org.eclipse.ui,
|
||||
org.eclipse.ui.workbench.texteditor,
|
||||
org.eclipse.lsp4e;bundle-version="0.12.0",
|
||||
org.eclipse.lsp4e;bundle-version="0.13.7",
|
||||
org.eclipse.lsp4j;bundle-version="0.6.0",
|
||||
org.eclipse.lsp4j.jsonrpc;bundle-version="0.6.0",
|
||||
org.eclipse.jface.text;bundle-version="3.12.0",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2020 Pivotal, Inc.
|
||||
* Copyright (c) 2020, 2021 Pivotal, Inc.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
@@ -21,6 +21,7 @@ import org.eclipse.jface.text.IDocument;
|
||||
import org.eclipse.jface.text.ITextSelection;
|
||||
import org.eclipse.jface.viewers.ISelection;
|
||||
import org.eclipse.jface.viewers.IStructuredSelection;
|
||||
import org.eclipse.lsp4e.LSPEclipseUtils;
|
||||
import org.eclipse.lsp4e.LanguageServiceAccessor;
|
||||
import org.eclipse.ui.IEditorInput;
|
||||
import org.eclipse.ui.IEditorPart;
|
||||
@@ -89,7 +90,7 @@ public class SelectionTracker extends AbstractDisposable {
|
||||
IDocument document = this.documentProvider.getDocument(input);
|
||||
// This step appears to be necessary to avoid having the current language server shutdown when disconnecting
|
||||
// a document (see dispose()) and a new one start up again every time a user changes selection and no editor is open
|
||||
LanguageServiceAccessor.getLanguageServers(document, capabilities -> capabilities.getDocumentSymbolProvider()).get();
|
||||
LanguageServiceAccessor.getLanguageServers(document, capabilities -> LSPEclipseUtils.hasCapability(capabilities.getDocumentSymbolProvider())).get();
|
||||
} catch (Exception e) {
|
||||
Log.log(e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user