Search in sources :

Example 1 with DidChangeConfigurationCapabilities

use of org.eclipse.lsp4j.DidChangeConfigurationCapabilities in project eclipse.jdt.ls by eclipse.

the class InitHandlerTest method initialize.

private InitializeResult initialize(boolean dynamicRegistration) throws InterruptedException, ExecutionException {
    InitializeParams params = new InitializeParams();
    ClientCapabilities capabilities = new ClientCapabilities();
    WorkspaceClientCapabilities workspaceCapabilities = new WorkspaceClientCapabilities();
    workspaceCapabilities.setDidChangeConfiguration(new DidChangeConfigurationCapabilities(dynamicRegistration));
    ExecuteCommandCapabilities executeCommand = new ExecuteCommandCapabilities(dynamicRegistration);
    workspaceCapabilities.setExecuteCommand(executeCommand);
    capabilities.setWorkspace(workspaceCapabilities);
    TextDocumentClientCapabilities textDocument = new TextDocumentClientCapabilities();
    SynchronizationCapabilities synchronizationCapabilities = new SynchronizationCapabilities();
    synchronizationCapabilities.setWillSave(Boolean.TRUE);
    synchronizationCapabilities.setWillSaveWaitUntil(Boolean.TRUE);
    capabilities.setTextDocument(textDocument);
    params.setCapabilities(capabilities);
    CompletableFuture<InitializeResult> result = server.initialize(params);
    return result.get();
}
Also used : WorkspaceClientCapabilities(org.eclipse.lsp4j.WorkspaceClientCapabilities) InitializeResult(org.eclipse.lsp4j.InitializeResult) DidChangeConfigurationCapabilities(org.eclipse.lsp4j.DidChangeConfigurationCapabilities) WorkspaceClientCapabilities(org.eclipse.lsp4j.WorkspaceClientCapabilities) TextDocumentClientCapabilities(org.eclipse.lsp4j.TextDocumentClientCapabilities) ClientCapabilities(org.eclipse.lsp4j.ClientCapabilities) SynchronizationCapabilities(org.eclipse.lsp4j.SynchronizationCapabilities) InitializeParams(org.eclipse.lsp4j.InitializeParams) ExecuteCommandCapabilities(org.eclipse.lsp4j.ExecuteCommandCapabilities) TextDocumentClientCapabilities(org.eclipse.lsp4j.TextDocumentClientCapabilities)

Aggregations

ClientCapabilities (org.eclipse.lsp4j.ClientCapabilities)1 DidChangeConfigurationCapabilities (org.eclipse.lsp4j.DidChangeConfigurationCapabilities)1 ExecuteCommandCapabilities (org.eclipse.lsp4j.ExecuteCommandCapabilities)1 InitializeParams (org.eclipse.lsp4j.InitializeParams)1 InitializeResult (org.eclipse.lsp4j.InitializeResult)1 SynchronizationCapabilities (org.eclipse.lsp4j.SynchronizationCapabilities)1 TextDocumentClientCapabilities (org.eclipse.lsp4j.TextDocumentClientCapabilities)1 WorkspaceClientCapabilities (org.eclipse.lsp4j.WorkspaceClientCapabilities)1