Class BSLLanguageServer
java.lang.Object
com.github._1c_syntax.bsl.languageserver.BSLLanguageServer
- All Implemented Interfaces:
ProtocolExtension
,LanguageServer
@Component
public class BSLLanguageServer
extends Object
implements LanguageServer, ProtocolExtension
-
Constructor Summary
ConstructorsConstructorDescriptionBSLLanguageServer
(LanguageServerConfiguration configuration, BSLTextDocumentService textDocumentService, BSLWorkspaceService workspaceService, CommandProvider commandProvider, ClientCapabilitiesHolder clientCapabilitiesHolder, ServerContext context, ServerInfo serverInfo) -
Method Summary
Modifier and TypeMethodDescriptiondiagnostics
(DiagnosticParams params) void
exit()
A notification to ask the server to exit its process.Provides access to the textDocument services.Provides access to the workspace services.initialize
(InitializeParams params) The initialize request is sent as the first request from the client to the server.shutdown()
The shutdown request is sent from the client to the server.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.lsp4j.services.LanguageServer
cancelProgress, getNotebookDocumentService, initialized, initialized, setTrace
-
Constructor Details
-
BSLLanguageServer
@ConstructorProperties({"configuration","textDocumentService","workspaceService","commandProvider","clientCapabilitiesHolder","context","serverInfo"}) public BSLLanguageServer(LanguageServerConfiguration configuration, BSLTextDocumentService textDocumentService, BSLWorkspaceService workspaceService, CommandProvider commandProvider, ClientCapabilitiesHolder clientCapabilitiesHolder, ServerContext context, ServerInfo serverInfo)
-
-
Method Details
-
initialize
Description copied from interface:org.eclipse.lsp4j.services.LanguageServer
The initialize request is sent as the first request from the client to the server.If the server receives requests or notifications before the initialize request, it should act as follows:
- for a request, the response should be errored with:
ResponseErrorCode.ServerNotInitialized
. The message can be picked by the server. - notifications should be dropped, except for the exit notification. This will allow the client to exit a server without an initialize request.
Until the server has responded to the initialize request with an InitializeResult, the client must not send any additional requests or notifications to the server.
During the initialize request, the server is allowed to send the notifications window/showMessage, window/logMessage, and telemetry/event, as well as the request window/showMessageRequest, to the client.
- Specified by:
initialize
in interfaceLanguageServer
- for a request, the response should be errored with:
-
shutdown
Description copied from interface:org.eclipse.lsp4j.services.LanguageServer
The shutdown request is sent from the client to the server. It asks the server to shutdown, but to not exit (otherwise the response might not be delivered correctly to the client). There is a separate exit notification that asks the server to exit.- Specified by:
shutdown
in interfaceLanguageServer
-
exit
public void exit()Description copied from interface:org.eclipse.lsp4j.services.LanguageServer
A notification to ask the server to exit its process.- Specified by:
exit
in interfaceLanguageServer
-
diagnostics
- Specified by:
diagnostics
in interfaceProtocolExtension
- Parameters:
params
- Параметры запроса.- Returns:
- Список рассчитанных диагностик.
-
getTextDocumentService
Description copied from interface:org.eclipse.lsp4j.services.LanguageServer
Provides access to the textDocument services.- Specified by:
getTextDocumentService
in interfaceLanguageServer
-
getWorkspaceService
Description copied from interface:org.eclipse.lsp4j.services.LanguageServer
Provides access to the workspace services.- Specified by:
getWorkspaceService
in interfaceLanguageServer
-