Debian Codegraph @

LspCpp/include/LibLsp/lsp/workspace/applyEdit.h

raw
1 #pragma once
2
3 #include "LibLsp/JsonRpc/RequestInMessage.h"
4 #include "LibLsp/JsonRpc/lsResponseMessage.h"
5
6 #include "LibLsp/lsp/lsDocumentUri.h"
7 #include "LibLsp/lsp/lsWorkspaceEdit.h"
8
9 struct ApplyWorkspaceEditParams
10 {
11 /**
12 * The edits to apply.
13 */
14
15 lsWorkspaceEdit edit;
16
17 /**
18 * An optional label of the workspace edit. This label is
19 * presented in the user interface for example on an undo
20 * stack to undo the workspace edit.
21 */
22 std::string label;
23
24 MAKE_SWAP_METHOD(ApplyWorkspaceEditParams, edit, label)
25 };
26 /**
27 * The workspace/applyEdit request is sent from the server to the client to modify resource on the client side.
28 */
29 MAKE_REFLECT_STRUCT(ApplyWorkspaceEditParams, edit, label);
30
31 struct ApplyWorkspaceEditResponse
32 {
33 bool applied;
34 optional<std::string> failureReason;
35 MAKE_SWAP_METHOD(ApplyWorkspaceEditResponse, applied, failureReason)
36 };
37 MAKE_REFLECT_STRUCT(ApplyWorkspaceEditResponse, applied, failureReason);
38
39 DEFINE_REQUEST_RESPONSE_TYPE(
40 WorkspaceApply, ApplyWorkspaceEditParams, ApplyWorkspaceEditResponse, "workspace/applyEdit"
41 );