Debian Codegraph @

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

raw
1 #pragma once
2 #include "LibLsp/JsonRpc/NotificationInMessage.h"
3 #include "LibLsp/lsp/workspace/workspaceFolders.h"
4 /**
5 * The workspace folder change event.
6 */
7 struct WorkspaceFoldersChangeEvent
8 {
9 /**
10 * The array of added workspace folders
11 */
12
13 std::vector<WorkspaceFolder> added;
14
15 /**
16 * The array of the removed workspace folders
17 */
18
19 std::vector<WorkspaceFolder> removed;
20 MAKE_SWAP_METHOD(WorkspaceFoldersChangeEvent, added, removed);
21 };
22 MAKE_REFLECT_STRUCT(WorkspaceFoldersChangeEvent, added, removed);
23
24 struct DidChangeWorkspaceFoldersParams
25 {
26 /**
27 * The actual workspace folder change event.
28 */
29
30 WorkspaceFoldersChangeEvent event;
31
32 MAKE_SWAP_METHOD(DidChangeWorkspaceFoldersParams, event);
33 };
34 MAKE_REFLECT_STRUCT(DidChangeWorkspaceFoldersParams, event);
35
36 /**
37 * The workspace/didChangeWorkspaceFolders notification is sent from the client
38 * to the server to inform the server about workspace folder configuration changes.
39 * The notification is sent by default if both ServerCapabilities/workspaceFolders
40 * and ClientCapabilities/workspace/workspaceFolders are true; or if the server has
41 * registered to receive this notification it first.
42 */
43 DEFINE_NOTIFICATION_TYPE(
44 Notify_WorkspaceDidChangeWorkspaceFolders, DidChangeWorkspaceFoldersParams, "workspace/didChangeWorkspaceFolders"
45 );