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);
});
}
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);
});
}
Aggregations