hanchenye-llvm-project/clang-tools-extra/clangd
Sam McCall 8a5dded8a5 [clangd] less boilerplate in RPC dispatch
Summary:
Make the ProtocolHandlers glue between JSONRPCDispatcher and
ClangdLSPServer generic.
Eliminate small differences between methods, de-emphasize the unimportant
distinction between notifications and methods.

ClangdLSPServer is no longer responsible for producing a complete
JSON-RPC response, just the JSON of the result object. (In future, we
should move that JSON serialization out, too).
Handler methods now take a context object that we may hang more
functionality off in the future.

Added documentation to ProtocolHandlers.

Reviewers: ilya-biryukov, bkramer

Reviewed By: ilya-biryukov

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D38464

llvm-svn: 315577
2017-10-12 13:29:58 +00:00
..
clients/clangd-vscode [clangd] Handle workspace/didChangeWatchedFiles 2017-10-02 18:00:37 +00:00
tool Revert "Revert r315214 since diff -Z isn't portable, this is breaking:" 2017-10-10 09:08:47 +00:00
CMakeLists.txt [clangd] Introduced Logger interface. 2017-09-20 07:24:15 +00:00
ClangdLSPServer.cpp [clangd] less boilerplate in RPC dispatch 2017-10-12 13:29:58 +00:00
ClangdLSPServer.h [clangd] less boilerplate in RPC dispatch 2017-10-12 13:29:58 +00:00
ClangdServer.cpp [clangd] Use UniqueFunction for deferred computations. 2017-10-10 16:12:54 +00:00
ClangdServer.h [clangd] Added move-only function helpers. 2017-10-09 16:26:26 +00:00
ClangdUnit.cpp [clangd] Use UniqueFunction for deferred computations. 2017-10-10 16:12:54 +00:00
ClangdUnit.h [clangd] Use UniqueFunction for deferred computations. 2017-10-10 16:12:54 +00:00
ClangdUnitStore.cpp [clangd] Introduced Logger interface. 2017-09-20 07:24:15 +00:00
ClangdUnitStore.h [clangd] Introduced Logger interface. 2017-09-20 07:24:15 +00:00
DraftStore.cpp Fixing compilation failures on buildbots. 2017-05-16 10:06:20 +00:00
DraftStore.h [clangd] Serialize onDiagnosticsReady callbacks for the same file. 2017-09-20 12:58:55 +00:00
Function.h [clangd] Added missing #includes to Function.h 2017-10-10 16:12:50 +00:00
GlobalCompilationDatabase.cpp [clangd] clang-format the source code. NFC. 2017-10-10 14:21:04 +00:00
GlobalCompilationDatabase.h [clangd] Command line arg to specify compile_commands.json path 2017-10-02 15:13:20 +00:00
JSONRPCDispatcher.cpp [clangd] less boilerplate in RPC dispatch 2017-10-12 13:29:58 +00:00
JSONRPCDispatcher.h [clangd] less boilerplate in RPC dispatch 2017-10-12 13:29:58 +00:00
Logger.cpp [clangd] Introduced Logger interface. 2017-09-20 07:24:15 +00:00
Logger.h [clangd] Introduced Logger interface. 2017-09-20 07:24:15 +00:00
Path.h Restored r303067 and fixed failing test. 2017-05-16 09:38:59 +00:00
Protocol.cpp [clangd] less boilerplate in RPC dispatch 2017-10-12 13:29:58 +00:00
Protocol.h [clangd] less boilerplate in RPC dispatch 2017-10-12 13:29:58 +00:00
ProtocolHandlers.cpp [clangd] less boilerplate in RPC dispatch 2017-10-12 13:29:58 +00:00
ProtocolHandlers.h [clangd] less boilerplate in RPC dispatch 2017-10-12 13:29:58 +00:00