private Either<TextDocumentSyncKind, TextDocumentSyncOptions> getTextDocumentSync() { return mergeTextDocumentSync(left.getTextDocumentSync(), right.getTextDocumentSync()); }
private TextDocumentSyncKind getDocumentSyncMode() { if (initResult!=null) { Either<TextDocumentSyncKind, TextDocumentSyncOptions> mode = initResult.getCapabilities().getTextDocumentSync(); if (mode.isLeft()) { return mode.getLeft(); } else { throw new IllegalStateException("Harness doesn't support fancy Sync options yet!"); } } return TextDocumentSyncKind.None; }
private void assertInitializeResultIsCorrect(Path expectedWorkspaceRoot, InitializeResult result) { assertThat(server.getWorkspaceRoot()).isEqualTo(expectedWorkspaceRoot); assertThat(result.getCapabilities().getTextDocumentSync().getLeft()) .isEqualTo(TextDocumentSyncKind.Incremental); assertThat(result.getCapabilities().getDocumentSymbolProvider()).isTrue(); assertThat(result.getCapabilities().getWorkspaceSymbolProvider()).isTrue(); }
setExecuteCommandProvider((org.eclipse.lsp4j.ExecuteCommandOptions)executeCommandProviderVal); if (o.getTextDocumentSync() == null) { setTextDocumentSync((org.eclipse.lsp4j.jsonrpc.messages.Either<org.eclipse.lsp4j.TextDocumentSyncKind, org.eclipse.lsp4j.TextDocumentSyncOptions>)null); } else { org.eclipse.lsp4j.jsonrpc.messages.Either<org.eclipse.lsp4j.TextDocumentSyncKind, org.eclipse.lsp4j.TextDocumentSyncOptions> textDocumentSyncVal; if (o.getTextDocumentSync().getLeft() != null) { org.eclipse.lsp4j.TextDocumentSyncKind textDocumentSyncVale = (org.eclipse.lsp4j.TextDocumentSyncKind)makeDto(o.getTextDocumentSync().getLeft());; textDocumentSyncVal= Either.forLeft(textDocumentSyncVale); } else { org.eclipse.lsp4j.TextDocumentSyncOptions textDocumentSyncVale = new TextDocumentSyncOptionsDto(o.getTextDocumentSync().getRight()); textDocumentSyncVal= Either.forRight(textDocumentSyncVale);