Removal of deprecated API
This commit is contained in:
@@ -213,7 +213,7 @@ public class STS4LanguageClientImpl extends LanguageClientImpl implements STS4La
|
||||
updateHighlightAnnotations(editor, sourceViewer, annotationModel, target, updateCodeMinings);
|
||||
}
|
||||
} else {
|
||||
URI uri = Utils.findDocUri(doc);
|
||||
URI uri = LSPEclipseUtils.toUri(doc);
|
||||
if (uri != null) {
|
||||
updateHighlightAnnotations(editor, sourceViewer, annotationModel, uri.toASCIIString(), updateCodeMinings);
|
||||
}
|
||||
@@ -488,7 +488,7 @@ public class STS4LanguageClientImpl extends LanguageClientImpl implements STS4La
|
||||
AbstractTextEditor editor = (AbstractTextEditor) _editor;
|
||||
IDocument doc = editor.getDocumentProvider().getDocument(editor.getEditorInput());
|
||||
if (doc!=null) {
|
||||
URI uri = Utils.findDocUri(doc);
|
||||
URI uri = LSPEclipseUtils.toUri(doc);
|
||||
if (cursorMovement.getUri().equals(uri.toASCIIString())) {
|
||||
org.eclipse.lsp4j.Position pos = cursorMovement.getPosition();
|
||||
int offset = LSPEclipseUtils.toOffset(pos, doc);
|
||||
|
||||
@@ -67,13 +67,6 @@ public class Utils {
|
||||
.map(viewer -> (ISourceViewer) viewer);
|
||||
}
|
||||
|
||||
public static URI findDocUri(IDocument doc) {
|
||||
for (LSPDocumentInfo info : LanguageServiceAccessor.getLSPDocumentInfosFor(doc, (x) -> true)) {
|
||||
return info.getFileUri();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static boolean isProperDocumentIdFor(IDocument doc, VersionedTextDocumentIdentifier id) {
|
||||
for (LSPDocumentInfo info : LanguageServiceAccessor.getLSPDocumentInfosFor(doc, (x) -> true)) {
|
||||
if (info.getVersion() == id.getVersion()) {
|
||||
|
||||
Reference in New Issue
Block a user