mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-21 21:52:10 +02:00
Bug 566093 - CDT LSP: null-free functions to retrieve URL from IDocument
Remove Server2ClientProtocolExtension::getUri Change-Id: Iee7e4808e40160e456f3db85c4dc98d04632a92a Signed-off-by: Alexander Fedorov <alexander.fedorov@arsysop.ru>
This commit is contained in:
parent
2d03236339
commit
f555015183
1 changed files with 0 additions and 14 deletions
|
@ -31,7 +31,6 @@ import org.eclipse.cdt.internal.ui.editor.SemanticHighlightingManager.Highlighti
|
|||
import org.eclipse.cdt.lsp.internal.text.ResolveDocumentUri;
|
||||
import org.eclipse.cdt.ui.CUIPlugin;
|
||||
import org.eclipse.cdt.ui.PreferenceConstants;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.jface.action.StatusLineContributionItem;
|
||||
import org.eclipse.jface.action.StatusLineManager;
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
|
@ -43,7 +42,6 @@ import org.eclipse.jface.text.Position;
|
|||
import org.eclipse.jface.text.Region;
|
||||
import org.eclipse.jface.text.TextAttribute;
|
||||
import org.eclipse.jface.text.TextPresentation;
|
||||
import org.eclipse.lsp4e.LSPEclipseUtils;
|
||||
import org.eclipse.lsp4e.LanguageClientImpl;
|
||||
import org.eclipse.lsp4j.Range;
|
||||
import org.eclipse.lsp4j.jsonrpc.services.JsonNotification;
|
||||
|
@ -247,16 +245,4 @@ public class Server2ClientProtocolExtension extends LanguageClientImpl {
|
|||
});
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns the URI of the Document provided.
|
||||
* Can return null value.
|
||||
*/
|
||||
public static URI getUri(IDocument document) {
|
||||
URI uri = null;
|
||||
IFile file = LSPEclipseUtils.getFile(document);
|
||||
if (file != null) {
|
||||
uri = LSPEclipseUtils.toUri(file);
|
||||
}
|
||||
return uri;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue