Verified Owner
Top Fields Constructors Methods
org.jabref.languageserver

public Class BibtexTextDocumentService

extends Object
implements TextDocumentService
Class Inheritance
All Implemented Interfaces
org.eclipse.lsp4j.services.TextDocumentService
Imports
java.util.List, .Map, java.util.concurrent.CompletableFuture, .ConcurrentHashMap, org.jabref.languageserver.util.LspDiagnosticHandler, .LspLinkHandler, org.jabref.logic.remote.server.RemoteMessageHandler, com.google.gson.JsonArray, org.eclipse.lsp4j.CompletionItem, .CompletionList, .CompletionParams, .DefinitionParams, .DidChangeTextDocumentParams, .DidCloseTextDocumentParams, .DidOpenTextDocumentParams, .DidSaveTextDocumentParams, .DocumentLink, .DocumentLinkParams, .Location, .LocationLink, .TextDocumentContentChangeEvent, .TextDocumentItem, .VersionedTextDocumentIdentifier, org.eclipse.lsp4j.jsonrpc.messages.Either, org.eclipse.lsp4j.services.LanguageClient, .TextDocumentService, org.jspecify.annotations.NonNull, org.slf4j.Logger, .LoggerFactory

Field Summary

Modifier and TypeField and Description
private LanguageClient
private final LspClientHandler
private final Map<String, String>
private final LspDiagnosticHandler
private final Map<String, String>
private final LspLinkHandler
private static final Logger
private final RemoteMessageHandler

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public CompletableFuture<Either<List<CompletionItem>, CompletionList>>
completion(CompletionParams position)

Overrides default org.eclipse.lsp4j.services.TextDocumentService.completion.

The Completion request is sent from the client to the server to compute completion items at a given cursor position.

public CompletableFuture<Either<List<? extends Location>, List<? extends LocationLink>>>
definition(DefinitionParams params)

Overrides default org.eclipse.lsp4j.services.TextDocumentService.definition.

The goto definition request is sent from the client to the server to resolve the definition location of a symbol at a given text document position.

public void
didChange(DidChangeTextDocumentParams params)

Implements org.eclipse.lsp4j.services.TextDocumentService.didChange.

The document change notification is sent from the client to the server to signal changes to a text document.

public void
didClose(DidCloseTextDocumentParams params)

Implements org.eclipse.lsp4j.services.TextDocumentService.didClose.

The document close notification is sent from the client to the server when the document got closed in the client.

public void
didOpen(DidOpenTextDocumentParams params)

Implements org.eclipse.lsp4j.services.TextDocumentService.didOpen.

The document open notification is sent from the client to the server to signal newly opened text documents.

public void
didSave(DidSaveTextDocumentParams params)

Implements org.eclipse.lsp4j.services.TextDocumentService.didSave.

The document save notification is sent from the client to the server when the document for saved in the client.

public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

clientback to summary
private LanguageClient client
clientHandlerback to summary
private final LspClientHandler clientHandler
contentCacheback to summary
private final Map<String, String> contentCache
diagnosticHandlerback to summary
private final LspDiagnosticHandler diagnosticHandler
fileUriToLanguageIdback to summary
private final Map<String, String> fileUriToLanguageId
linkHandlerback to summary
private final LspLinkHandler linkHandler
LOGGERback to summary
private static final Logger LOGGER
messageHandlerback to summary
private final RemoteMessageHandler messageHandler

Constructor Detail

BibtexTextDocumentServiceback to summary
public BibtexTextDocumentService(@NonNull RemoteMessageHandler messageHandler, @NonNull LspClientHandler clientHandler, @NonNull LspDiagnosticHandler diagnosticHandler, @NonNull LspLinkHandler linkHandler)

Method Detail

completionback to summary
public CompletableFuture<Either<List<CompletionItem>, CompletionList>> completion(CompletionParams position)

Overrides default org.eclipse.lsp4j.services.TextDocumentService.completion.

Doc from org.eclipse.lsp4j.services.TextDocumentService.completion.

The Completion request is sent from the client to the server to compute completion items at a given cursor position. Completion items are presented in the IntelliSense user interface. If computing complete completion items is expensive servers can additional provide a handler for the resolve completion item request. This request is sent when a completion item is selected in the user interface.

Registration Options: org.eclipse.lsp4j.CompletionRegistrationOptions

Annotations
@Override
definitionback to summary
public CompletableFuture<Either<List<? extends Location>, List<? extends LocationLink>>> definition(DefinitionParams params)

Overrides default org.eclipse.lsp4j.services.TextDocumentService.definition.

Doc from org.eclipse.lsp4j.services.TextDocumentService.definition.

The goto definition request is sent from the client to the server to resolve the definition location of a symbol at a given text document position.

Registration Options: org.eclipse.lsp4j.DefinitionRegistrationOptions

Annotations
@Override
didChangeback to summary
public void didChange(DidChangeTextDocumentParams params)

Implements org.eclipse.lsp4j.services.TextDocumentService.didChange.

Doc from org.eclipse.lsp4j.services.TextDocumentService.didChange.

The document change notification is sent from the client to the server to signal changes to a text document.

Registration Options: org.eclipse.lsp4j.TextDocumentChangeRegistrationOptions

Annotations
@Override
didCloseback to summary
public void didClose(DidCloseTextDocumentParams params)

Implements org.eclipse.lsp4j.services.TextDocumentService.didClose.

Doc from org.eclipse.lsp4j.services.TextDocumentService.didClose.

The document close notification is sent from the client to the server when the document got closed in the client. The document's truth now exists where the document's uri points to (e.g. if the document's uri is a file uri the truth now exists on disk).

Registration Options: org.eclipse.lsp4j.TextDocumentRegistrationOptions

Annotations
@Override
didOpenback to summary
public void didOpen(DidOpenTextDocumentParams params)

Implements org.eclipse.lsp4j.services.TextDocumentService.didOpen.

Doc from org.eclipse.lsp4j.services.TextDocumentService.didOpen.

The document open notification is sent from the client to the server to signal newly opened text documents. The document's truth is now managed by the client and the server must not try to read the document's truth using the document's uri.

Registration Options: org.eclipse.lsp4j.TextDocumentRegistrationOptions

Annotations
@Override
didSaveback to summary
public void didSave(DidSaveTextDocumentParams params)

Implements org.eclipse.lsp4j.services.TextDocumentService.didSave.

Doc from org.eclipse.lsp4j.services.TextDocumentService.didSave.

The document save notification is sent from the client to the server when the document for saved in the client.

Registration Options: org.eclipse.lsp4j.TextDocumentSaveRegistrationOptions

Annotations
@Override
setClientback to summary
public void setClient(LanguageClient client)