Search in sources :

Example 1 with WorkspaceEditCapabilities

use of org.eclipse.lsp4j.WorkspaceEditCapabilities in project xtext-core by eclipse.

the class RenameTest3 method initialize.

@Override
protected InitializeResult initialize() {
    return super.initialize((InitializeParams params) -> {
        ClientCapabilities clientCapabilities = new ClientCapabilities();
        WorkspaceClientCapabilities workspaceClientCapabilities = new WorkspaceClientCapabilities();
        WorkspaceEditCapabilities workspaceEditCapabilities = new WorkspaceEditCapabilities();
        workspaceEditCapabilities.setDocumentChanges(true);
        workspaceClientCapabilities.setWorkspaceEdit(workspaceEditCapabilities);
        clientCapabilities.setWorkspace(workspaceClientCapabilities);
        TextDocumentClientCapabilities textDocumentClientCapabilities = new TextDocumentClientCapabilities();
        textDocumentClientCapabilities.setRename(new RenameCapabilities(true, false));
        clientCapabilities.setTextDocument(textDocumentClientCapabilities);
        params.setCapabilities(clientCapabilities);
    });
}
Also used : WorkspaceClientCapabilities(org.eclipse.lsp4j.WorkspaceClientCapabilities) WorkspaceEditCapabilities(org.eclipse.lsp4j.WorkspaceEditCapabilities) RenameCapabilities(org.eclipse.lsp4j.RenameCapabilities) WorkspaceClientCapabilities(org.eclipse.lsp4j.WorkspaceClientCapabilities) TextDocumentClientCapabilities(org.eclipse.lsp4j.TextDocumentClientCapabilities) ClientCapabilities(org.eclipse.lsp4j.ClientCapabilities) InitializeParams(org.eclipse.lsp4j.InitializeParams) TextDocumentClientCapabilities(org.eclipse.lsp4j.TextDocumentClientCapabilities)

Example 2 with WorkspaceEditCapabilities

use of org.eclipse.lsp4j.WorkspaceEditCapabilities in project xtext-core by eclipse.

the class RenameTest2 method initialize.

@Override
protected InitializeResult initialize() {
    return super.initialize((InitializeParams params) -> {
        ClientCapabilities clientCapabilities = new ClientCapabilities();
        WorkspaceClientCapabilities workspaceClientCapabilities = new WorkspaceClientCapabilities();
        WorkspaceEditCapabilities workspaceEditCapabilities = new WorkspaceEditCapabilities();
        workspaceEditCapabilities.setDocumentChanges(true);
        workspaceClientCapabilities.setWorkspaceEdit(workspaceEditCapabilities);
        clientCapabilities.setWorkspace(workspaceClientCapabilities);
        TextDocumentClientCapabilities textDocumentClientCapabilities = new TextDocumentClientCapabilities();
        textDocumentClientCapabilities.setRename(new RenameCapabilities(true, false));
        clientCapabilities.setTextDocument(textDocumentClientCapabilities);
        params.setCapabilities(clientCapabilities);
    });
}
Also used : WorkspaceClientCapabilities(org.eclipse.lsp4j.WorkspaceClientCapabilities) WorkspaceEditCapabilities(org.eclipse.lsp4j.WorkspaceEditCapabilities) RenameCapabilities(org.eclipse.lsp4j.RenameCapabilities) WorkspaceClientCapabilities(org.eclipse.lsp4j.WorkspaceClientCapabilities) TextDocumentClientCapabilities(org.eclipse.lsp4j.TextDocumentClientCapabilities) ClientCapabilities(org.eclipse.lsp4j.ClientCapabilities) InitializeParams(org.eclipse.lsp4j.InitializeParams) TextDocumentClientCapabilities(org.eclipse.lsp4j.TextDocumentClientCapabilities)

Aggregations

ClientCapabilities (org.eclipse.lsp4j.ClientCapabilities)2 InitializeParams (org.eclipse.lsp4j.InitializeParams)2 RenameCapabilities (org.eclipse.lsp4j.RenameCapabilities)2 TextDocumentClientCapabilities (org.eclipse.lsp4j.TextDocumentClientCapabilities)2 WorkspaceClientCapabilities (org.eclipse.lsp4j.WorkspaceClientCapabilities)2 WorkspaceEditCapabilities (org.eclipse.lsp4j.WorkspaceEditCapabilities)2