1 | // Copyright (C) 2021 The Qt Company Ltd. |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | // this file was generated by the generate.ts script |
5 | |
6 | #ifndef QLANGUAGESERVERSPECTYPES_P_H |
7 | #define QLANGUAGESERVERSPECTYPES_P_H |
8 | |
9 | // |
10 | // W A R N I N G |
11 | // ------------- |
12 | // |
13 | // This file is not part of the Qt API. It exists purely as an |
14 | // implementation detail. This header file may change from version to |
15 | // version without notice, or even be removed. |
16 | // |
17 | // We mean it. |
18 | // |
19 | |
20 | #include <QtLanguageServer/qtlanguageserverglobal.h> |
21 | #include <QtLanguageServer/private/qlanguageserverprespectypes_p.h> |
22 | #include <QtJsonRpc/private/qtypedjson_p.h> |
23 | #include <QtCore/QByteArray> |
24 | #include <QtCore/QList> |
25 | #include <QtCore/QJsonValue> |
26 | #include <QtCore/QJsonObject> |
27 | #include <QtCore/QString> |
28 | |
29 | #include <optional> |
30 | #include <variant> |
31 | |
32 | QT_BEGIN_NAMESPACE |
33 | namespace QLspSpecification { |
34 | Q_NAMESPACE_EXPORT(Q_LANGUAGESERVER_EXPORT) |
35 | |
36 | enum class TraceValue { Off, Messages, Verbose }; |
37 | Q_ENUM_NS(TraceValue) |
38 | |
39 | enum class ErrorCodes { |
40 | // Defined by JSON RPC |
41 | ParseError = -32700, |
42 | InvalidRequest = -32600, |
43 | MethodNotFound = -32601, |
44 | InvalidParams = -32602, |
45 | InternalError = -32603, |
46 | |
47 | jsonrpcReservedErrorRangeStart = -32099, |
48 | /** @deprecated use jsonrpcReservedErrorRangeStart */ |
49 | serverErrorStart = jsonrpcReservedErrorRangeStart, |
50 | |
51 | ServerNotInitialized = -32002, |
52 | UnknownErrorCode = -32001, |
53 | |
54 | jsonrpcReservedErrorRangeEnd = -32000, |
55 | /** @deprecated use jsonrpcReservedErrorRangeEnd */ |
56 | serverErrorEnd = jsonrpcReservedErrorRangeEnd, |
57 | |
58 | lspReservedErrorRangeStart = -32899, |
59 | |
60 | ContentModified = -32801, |
61 | RequestCancelled = -32800, |
62 | |
63 | lspReservedErrorRangeEnd = -32800 |
64 | }; |
65 | Q_ENUM_NS(ErrorCodes) |
66 | |
67 | enum class DiagnosticSeverity { Error = 1, Warning = 2, Information = 3, Hint = 4 }; |
68 | Q_ENUM_NS(DiagnosticSeverity) |
69 | |
70 | enum class DiagnosticTag { Unnecessary = 1, Deprecated = 2 }; |
71 | Q_ENUM_NS(DiagnosticTag) |
72 | |
73 | enum class ResourceOperationKind { Create, Rename, Delete }; |
74 | Q_ENUM_NS(ResourceOperationKind) |
75 | |
76 | enum class FailureHandlingKind { Abort, Transactional, TextOnlyTransactional, Undo }; |
77 | Q_ENUM_NS(FailureHandlingKind) |
78 | |
79 | enum class MarkupKind { PlainText, Markdown }; |
80 | Q_ENUM_NS(MarkupKind) |
81 | |
82 | enum class InitializeErrorCode { UnknownProtocolVersion = 1 }; |
83 | Q_ENUM_NS(InitializeErrorCode) |
84 | |
85 | enum class MessageType { Error = 1, Warning = 2, Info = 3, Log = 4 }; |
86 | Q_ENUM_NS(MessageType) |
87 | |
88 | enum class WatchKind { Create = 1, Change = 2, Delete = 4 }; |
89 | Q_ENUM_NS(WatchKind) |
90 | |
91 | enum class FileChangeType { Created = 1, Changed = 2, Deleted = 3 }; |
92 | Q_ENUM_NS(FileChangeType) |
93 | |
94 | enum class FileOperationPatternKind { File, Folder }; |
95 | Q_ENUM_NS(FileOperationPatternKind) |
96 | |
97 | enum class TextDocumentSyncKind { None = 0, Full = 1, Incremental = 2 }; |
98 | Q_ENUM_NS(TextDocumentSyncKind) |
99 | |
100 | enum class TextDocumentSaveReason { Manual = 1, AfterDelay = 2, FocusOut = 3 }; |
101 | Q_ENUM_NS(TextDocumentSaveReason) |
102 | |
103 | enum class CompletionTriggerKind { |
104 | Invoked = 1, |
105 | TriggerCharacter = 2, |
106 | TriggerForIncompleteCompletions = 3 |
107 | }; |
108 | Q_ENUM_NS(CompletionTriggerKind) |
109 | |
110 | enum class InsertTextFormat { PlainText = 1, Snippet = 2 }; |
111 | Q_ENUM_NS(InsertTextFormat) |
112 | |
113 | enum class CompletionItemTag { Deprecated = 1 }; |
114 | Q_ENUM_NS(CompletionItemTag) |
115 | |
116 | enum class InsertTextMode { AsIs = 1, AdjustIndentation = 2 }; |
117 | Q_ENUM_NS(InsertTextMode) |
118 | |
119 | enum class CompletionItemKind { |
120 | Text = 1, |
121 | Method = 2, |
122 | Function = 3, |
123 | Constructor = 4, |
124 | Field = 5, |
125 | Variable = 6, |
126 | Class = 7, |
127 | Interface = 8, |
128 | Module = 9, |
129 | Property = 10, |
130 | Unit = 11, |
131 | Value = 12, |
132 | Enum = 13, |
133 | Keyword = 14, |
134 | Snippet = 15, |
135 | Color = 16, |
136 | File = 17, |
137 | Reference = 18, |
138 | Folder = 19, |
139 | EnumMember = 20, |
140 | Constant = 21, |
141 | Struct = 22, |
142 | Event = 23, |
143 | Operator = 24, |
144 | TypeParameter = 25 |
145 | }; |
146 | Q_ENUM_NS(CompletionItemKind) |
147 | |
148 | enum class SignatureHelpTriggerKind { Invoked = 1, TriggerCharacter = 2, ContentChange = 3 }; |
149 | Q_ENUM_NS(SignatureHelpTriggerKind) |
150 | |
151 | enum class DocumentHighlightKind { Text = 1, Read = 2, Write = 3 }; |
152 | Q_ENUM_NS(DocumentHighlightKind) |
153 | |
154 | enum class SymbolKind { |
155 | File = 1, |
156 | Module = 2, |
157 | Namespace = 3, |
158 | Package = 4, |
159 | Class = 5, |
160 | Method = 6, |
161 | Property = 7, |
162 | Field = 8, |
163 | Constructor = 9, |
164 | Enum = 10, |
165 | Interface = 11, |
166 | Function = 12, |
167 | Variable = 13, |
168 | Constant = 14, |
169 | String = 15, |
170 | Number = 16, |
171 | Boolean = 17, |
172 | Array = 18, |
173 | Object = 19, |
174 | Key = 20, |
175 | Null = 21, |
176 | EnumMember = 22, |
177 | Struct = 23, |
178 | Event = 24, |
179 | Operator = 25, |
180 | TypeParameter = 26 |
181 | }; |
182 | Q_ENUM_NS(SymbolKind) |
183 | |
184 | enum class SymbolTag { Deprecated = 1 }; |
185 | Q_ENUM_NS(SymbolTag) |
186 | |
187 | enum class CodeActionKind { |
188 | Empty, |
189 | QuickFix, |
190 | Refactor, |
191 | , |
192 | RefactorInline, |
193 | RefactorRewrite, |
194 | Source, |
195 | SourceOrganizeImports |
196 | }; |
197 | Q_ENUM_NS(CodeActionKind) |
198 | |
199 | enum class PrepareSupportDefaultBehavior { Identifier = 1 }; |
200 | Q_ENUM_NS(PrepareSupportDefaultBehavior) |
201 | |
202 | enum class FoldingRangeKind { , Imports, Region }; |
203 | Q_ENUM_NS(FoldingRangeKind) |
204 | |
205 | enum class SemanticTokenTypes { |
206 | Namespace, |
207 | Type, |
208 | Class, |
209 | Enum, |
210 | Interface, |
211 | Struct, |
212 | TypeParameter, |
213 | Parameter, |
214 | Variable, |
215 | Property, |
216 | EnumMember, |
217 | Event, |
218 | Function, |
219 | Method, |
220 | Macro, |
221 | Keyword, |
222 | Modifier, |
223 | , |
224 | String, |
225 | Number, |
226 | Regexp, |
227 | Operator |
228 | }; |
229 | Q_ENUM_NS(SemanticTokenTypes) |
230 | |
231 | enum class SemanticTokenModifiers { |
232 | Declaration, |
233 | Definition, |
234 | Readonly, |
235 | Static, |
236 | Deprecated, |
237 | Abstract, |
238 | Async, |
239 | Modification, |
240 | Documentation, |
241 | DefaultLibrary |
242 | }; |
243 | Q_ENUM_NS(SemanticTokenModifiers) |
244 | |
245 | enum class TokenFormat { Relative }; |
246 | Q_ENUM_NS(TokenFormat) |
247 | |
248 | enum class UniquenessLevel { Document, Project, Group, Scheme, Global }; |
249 | Q_ENUM_NS(UniquenessLevel) |
250 | |
251 | enum class MonikerKind { Import, Export, Local }; |
252 | Q_ENUM_NS(MonikerKind) |
253 | |
254 | class Q_LANGUAGESERVER_EXPORT ResponseError |
255 | { |
256 | public: |
257 | int code = {}; |
258 | QByteArray message = {}; |
259 | std::optional<QJsonValue> data = {}; |
260 | |
261 | template<typename W> |
262 | void walk(W &w) |
263 | { |
264 | field(w, "code" , code); |
265 | field(w, "message" , message); |
266 | field(w, "data" , data); |
267 | } |
268 | }; |
269 | |
270 | class Q_LANGUAGESERVER_EXPORT CancelParams |
271 | { |
272 | public: |
273 | std::variant<QByteArray, int> id = {}; |
274 | |
275 | template<typename W> |
276 | void walk(W &w) |
277 | { |
278 | field(w, "id" , id); |
279 | } |
280 | }; |
281 | |
282 | class Q_LANGUAGESERVER_EXPORT RegularExpressionsClientCapabilities |
283 | { |
284 | public: |
285 | QByteArray engine = {}; |
286 | std::optional<QByteArray> version = {}; |
287 | |
288 | template<typename W> |
289 | void walk(W &w) |
290 | { |
291 | field(w, "engine" , engine); |
292 | field(w, "version" , version); |
293 | } |
294 | }; |
295 | |
296 | class Q_LANGUAGESERVER_EXPORT Position |
297 | { |
298 | public: |
299 | int line = {}; |
300 | int character = {}; |
301 | |
302 | template<typename W> |
303 | void walk(W &w) |
304 | { |
305 | field(w, "line" , line); |
306 | field(w, "character" , character); |
307 | } |
308 | }; |
309 | |
310 | class Q_LANGUAGESERVER_EXPORT Range |
311 | { |
312 | public: |
313 | Position start = {}; |
314 | Position end = {}; |
315 | |
316 | template<typename W> |
317 | void walk(W &w) |
318 | { |
319 | field(w, "start" , start); |
320 | field(w, "end" , end); |
321 | } |
322 | }; |
323 | |
324 | class Q_LANGUAGESERVER_EXPORT TextDocumentContentChangeEvent |
325 | { |
326 | public: |
327 | std::optional<Range> range = {}; |
328 | std::optional<int> rangeLength = {}; |
329 | QByteArray text = {}; |
330 | |
331 | template<typename W> |
332 | void walk(W &w) |
333 | { |
334 | field(w, "range" , range); |
335 | field(w, "rangeLength" , rangeLength); |
336 | field(w, "text" , text); |
337 | } |
338 | }; |
339 | |
340 | class Q_LANGUAGESERVER_EXPORT SelectionRange |
341 | { |
342 | public: |
343 | SelectionRange() = default; |
344 | SelectionRange(const Range &r) : range(r) { } |
345 | SelectionRange(const SelectionRange &o) : range(o.range) |
346 | { |
347 | if (o.parent) |
348 | parent = std::make_unique<SelectionRange>(args&: *o.parent); |
349 | } |
350 | SelectionRange &operator=(const SelectionRange &o) |
351 | { |
352 | range = o.range; |
353 | if (o.parent) |
354 | parent = std::make_unique<SelectionRange>(args&: *o.parent); |
355 | return *this; |
356 | } |
357 | SelectionRange(SelectionRange &&) noexcept = default; |
358 | SelectionRange &operator=(SelectionRange &&) noexcept = default; |
359 | |
360 | Range range = {}; |
361 | std::unique_ptr<SelectionRange> parent; |
362 | |
363 | template<typename W> |
364 | void walk(W &w) |
365 | { |
366 | field(w, "range" , range); |
367 | field(w, "parent" , parent); |
368 | } |
369 | }; |
370 | |
371 | class Q_LANGUAGESERVER_EXPORT RangePlaceHolder |
372 | { |
373 | public: |
374 | Range range = {}; |
375 | QByteArray placeholder = {}; |
376 | |
377 | template<typename W> |
378 | void walk(W &w) |
379 | { |
380 | field(w, "range" , range); |
381 | field(w, "placeholder" , placeholder); |
382 | } |
383 | }; |
384 | |
385 | class Q_LANGUAGESERVER_EXPORT DefaultBehaviorStruct |
386 | { |
387 | public: |
388 | bool defaultBehavior = {}; |
389 | |
390 | template<typename W> |
391 | void walk(W &w) |
392 | { |
393 | field(w, "defaultBehavior" , defaultBehavior); |
394 | } |
395 | }; |
396 | |
397 | class Q_LANGUAGESERVER_EXPORT Location |
398 | { |
399 | public: |
400 | QByteArray uri = {}; |
401 | Range range = {}; |
402 | |
403 | template<typename W> |
404 | void walk(W &w) |
405 | { |
406 | field(w, "uri" , uri); |
407 | field(w, "range" , range); |
408 | } |
409 | }; |
410 | |
411 | class Q_LANGUAGESERVER_EXPORT LocationLink |
412 | { |
413 | public: |
414 | std::optional<Range> originSelectionRange = {}; |
415 | QByteArray targetUri = {}; |
416 | Range targetRange = {}; |
417 | Range targetSelectionRange = {}; |
418 | |
419 | template<typename W> |
420 | void walk(W &w) |
421 | { |
422 | field(w, "originSelectionRange" , originSelectionRange); |
423 | field(w, "targetUri" , targetUri); |
424 | field(w, "targetRange" , targetRange); |
425 | field(w, "targetSelectionRange" , targetSelectionRange); |
426 | } |
427 | }; |
428 | |
429 | class Q_LANGUAGESERVER_EXPORT DiagnosticRelatedInformation |
430 | { |
431 | public: |
432 | Location location = {}; |
433 | QByteArray message = {}; |
434 | |
435 | template<typename W> |
436 | void walk(W &w) |
437 | { |
438 | field(w, "location" , location); |
439 | field(w, "message" , message); |
440 | } |
441 | }; |
442 | |
443 | class Q_LANGUAGESERVER_EXPORT CodeDescription |
444 | { |
445 | public: |
446 | QByteArray href = {}; |
447 | |
448 | template<typename W> |
449 | void walk(W &w) |
450 | { |
451 | field(w, "href" , href); |
452 | } |
453 | }; |
454 | |
455 | class Q_LANGUAGESERVER_EXPORT Diagnostic |
456 | { |
457 | public: |
458 | Range range = {}; |
459 | std::optional<DiagnosticSeverity> severity = {}; |
460 | std::optional<std::variant<QByteArray, int>> code = {}; |
461 | std::optional<CodeDescription> codeDescription = {}; |
462 | std::optional<QByteArray> source = {}; |
463 | QByteArray message = {}; |
464 | std::optional<QList<DiagnosticTag>> tags = {}; |
465 | std::optional<QList<DiagnosticRelatedInformation>> relatedInformation = {}; |
466 | std::optional<QJsonValue> data = {}; |
467 | |
468 | template<typename W> |
469 | void walk(W &w) |
470 | { |
471 | field(w, "range" , range); |
472 | field(w, "severity" , severity); |
473 | field(w, "code" , code); |
474 | field(w, "codeDescription" , codeDescription); |
475 | field(w, "source" , source); |
476 | field(w, "message" , message); |
477 | field(w, "tags" , tags); |
478 | field(w, "relatedInformation" , relatedInformation); |
479 | field(w, "data" , data); |
480 | } |
481 | }; |
482 | |
483 | class Q_LANGUAGESERVER_EXPORT Command |
484 | { |
485 | public: |
486 | QByteArray title = {}; |
487 | QByteArray command = {}; |
488 | std::optional<QList<QJsonValue>> arguments = {}; |
489 | |
490 | template<typename W> |
491 | void walk(W &w) |
492 | { |
493 | field(w, "title" , title); |
494 | field(w, "command" , command); |
495 | field(w, "arguments" , arguments); |
496 | } |
497 | }; |
498 | |
499 | class Q_LANGUAGESERVER_EXPORT TextEdit |
500 | { |
501 | public: |
502 | Range range = {}; |
503 | QByteArray newText = {}; |
504 | |
505 | template<typename W> |
506 | void walk(W &w) |
507 | { |
508 | field(w, "range" , range); |
509 | field(w, "newText" , newText); |
510 | } |
511 | }; |
512 | |
513 | class Q_LANGUAGESERVER_EXPORT ChangeAnnotation |
514 | { |
515 | public: |
516 | QByteArray label = {}; |
517 | std::optional<bool> needsConfirmation = {}; |
518 | std::optional<QByteArray> description = {}; |
519 | |
520 | template<typename W> |
521 | void walk(W &w) |
522 | { |
523 | field(w, "label" , label); |
524 | field(w, "needsConfirmation" , needsConfirmation); |
525 | field(w, "description" , description); |
526 | } |
527 | }; |
528 | |
529 | class Q_LANGUAGESERVER_EXPORT AnnotatedTextEdit : public TextEdit |
530 | { |
531 | public: |
532 | QByteArray annotationId = {}; |
533 | |
534 | template<typename W> |
535 | void walk(W &w) |
536 | { |
537 | TextEdit::walk(w); |
538 | field(w, "annotationId" , annotationId); |
539 | } |
540 | }; |
541 | |
542 | class Q_LANGUAGESERVER_EXPORT TextDocumentIdentifier |
543 | { |
544 | public: |
545 | QByteArray uri = {}; |
546 | |
547 | template<typename W> |
548 | void walk(W &w) |
549 | { |
550 | field(w, "uri" , uri); |
551 | } |
552 | }; |
553 | |
554 | class Q_LANGUAGESERVER_EXPORT OptionalVersionedTextDocumentIdentifier |
555 | : public TextDocumentIdentifier |
556 | { |
557 | public: |
558 | std::variant<int, std::nullptr_t> version = nullptr; |
559 | |
560 | template<typename W> |
561 | void walk(W &w) |
562 | { |
563 | TextDocumentIdentifier::walk(w); |
564 | field(w, "version" , version); |
565 | } |
566 | }; |
567 | |
568 | class Q_LANGUAGESERVER_EXPORT TextDocumentEdit |
569 | { |
570 | public: |
571 | OptionalVersionedTextDocumentIdentifier textDocument = {}; |
572 | QList<std::variant<TextEdit, AnnotatedTextEdit>> edits = {}; |
573 | |
574 | template<typename W> |
575 | void walk(W &w) |
576 | { |
577 | field(w, "textDocument" , textDocument); |
578 | field(w, "edits" , edits); |
579 | } |
580 | }; |
581 | |
582 | class Q_LANGUAGESERVER_EXPORT CreateFileOptions |
583 | { |
584 | public: |
585 | std::optional<bool> overwrite = {}; |
586 | std::optional<bool> ignoreIfExists = {}; |
587 | |
588 | template<typename W> |
589 | void walk(W &w) |
590 | { |
591 | field(w, "overwrite" , overwrite); |
592 | field(w, "ignoreIfExists" , ignoreIfExists); |
593 | } |
594 | }; |
595 | |
596 | class Q_LANGUAGESERVER_EXPORT CreateFile |
597 | { |
598 | public: |
599 | QByteArray kind = {}; |
600 | QByteArray uri = {}; |
601 | std::optional<CreateFileOptions> options = {}; |
602 | std::optional<QByteArray> annotationId = {}; |
603 | |
604 | template<typename W> |
605 | void walk(W &w) |
606 | { |
607 | field(w, "kind" , kind); |
608 | field(w, "uri" , uri); |
609 | field(w, "options" , options); |
610 | field(w, "annotationId" , annotationId); |
611 | } |
612 | }; |
613 | |
614 | class Q_LANGUAGESERVER_EXPORT RenameFileOptions |
615 | { |
616 | public: |
617 | std::optional<bool> overwrite = {}; |
618 | std::optional<bool> ignoreIfExists = {}; |
619 | |
620 | template<typename W> |
621 | void walk(W &w) |
622 | { |
623 | field(w, "overwrite" , overwrite); |
624 | field(w, "ignoreIfExists" , ignoreIfExists); |
625 | } |
626 | }; |
627 | |
628 | class Q_LANGUAGESERVER_EXPORT RenameFile |
629 | { |
630 | public: |
631 | QByteArray kind = {}; |
632 | QByteArray oldUri = {}; |
633 | QByteArray newUri = {}; |
634 | std::optional<RenameFileOptions> options = {}; |
635 | std::optional<QByteArray> annotationId = {}; |
636 | |
637 | template<typename W> |
638 | void walk(W &w) |
639 | { |
640 | field(w, "kind" , kind); |
641 | field(w, "oldUri" , oldUri); |
642 | field(w, "newUri" , newUri); |
643 | field(w, "options" , options); |
644 | field(w, "annotationId" , annotationId); |
645 | } |
646 | }; |
647 | |
648 | class Q_LANGUAGESERVER_EXPORT DeleteFileOptions |
649 | { |
650 | public: |
651 | std::optional<bool> recursive = {}; |
652 | std::optional<bool> ignoreIfNotExists = {}; |
653 | |
654 | template<typename W> |
655 | void walk(W &w) |
656 | { |
657 | field(w, "recursive" , recursive); |
658 | field(w, "ignoreIfNotExists" , ignoreIfNotExists); |
659 | } |
660 | }; |
661 | |
662 | class Q_LANGUAGESERVER_EXPORT DeleteFile |
663 | { |
664 | public: |
665 | QByteArray kind = {}; |
666 | QByteArray uri = {}; |
667 | std::optional<DeleteFileOptions> options = {}; |
668 | std::optional<QByteArray> annotationId = {}; |
669 | |
670 | template<typename W> |
671 | void walk(W &w) |
672 | { |
673 | field(w, "kind" , kind); |
674 | field(w, "uri" , uri); |
675 | field(w, "options" , options); |
676 | field(w, "annotationId" , annotationId); |
677 | } |
678 | }; |
679 | |
680 | class Q_LANGUAGESERVER_EXPORT WorkspaceEdit |
681 | { |
682 | public: |
683 | std::optional<QJsonObject> changes = {}; |
684 | std::optional< |
685 | std::variant<QList<TextDocumentEdit>, |
686 | QList<std::variant<TextDocumentEdit, CreateFile, RenameFile, DeleteFile>>>> |
687 | documentChanges = {}; |
688 | std::optional<QJsonObject> changeAnnotations = {}; |
689 | |
690 | template<typename W> |
691 | void walk(W &w) |
692 | { |
693 | field(w, "changes" , changes); |
694 | field(w, "documentChanges" , documentChanges); |
695 | field(w, "changeAnnotations" , changeAnnotations); |
696 | } |
697 | }; |
698 | |
699 | class Q_LANGUAGESERVER_EXPORT WorkspaceEditClientCapabilities |
700 | { |
701 | public: |
702 | std::optional<bool> documentChanges = {}; |
703 | std::optional<QList<ResourceOperationKind>> resourceOperations = {}; |
704 | std::optional<FailureHandlingKind> failureHandling = {}; |
705 | std::optional<bool> normalizesLineEndings = {}; |
706 | std::optional<QJsonObject> changeAnnotationSupport = {}; |
707 | |
708 | template<typename W> |
709 | void walk(W &w) |
710 | { |
711 | field(w, "documentChanges" , documentChanges); |
712 | field(w, "resourceOperations" , resourceOperations); |
713 | field(w, "failureHandling" , failureHandling); |
714 | field(w, "normalizesLineEndings" , normalizesLineEndings); |
715 | field(w, "changeAnnotationSupport" , changeAnnotationSupport); |
716 | } |
717 | }; |
718 | |
719 | class Q_LANGUAGESERVER_EXPORT TextDocumentItem |
720 | { |
721 | public: |
722 | QByteArray uri = {}; |
723 | QByteArray languageId = {}; |
724 | int version = {}; |
725 | QByteArray text = {}; |
726 | |
727 | template<typename W> |
728 | void walk(W &w) |
729 | { |
730 | field(w, "uri" , uri); |
731 | field(w, "languageId" , languageId); |
732 | field(w, "version" , version); |
733 | field(w, "text" , text); |
734 | } |
735 | }; |
736 | |
737 | class Q_LANGUAGESERVER_EXPORT VersionedTextDocumentIdentifier : public TextDocumentIdentifier |
738 | { |
739 | public: |
740 | int version = {}; |
741 | |
742 | template<typename W> |
743 | void walk(W &w) |
744 | { |
745 | TextDocumentIdentifier::walk(w); |
746 | field(w, "version" , version); |
747 | } |
748 | }; |
749 | |
750 | class Q_LANGUAGESERVER_EXPORT TextDocumentPositionParams |
751 | { |
752 | public: |
753 | TextDocumentIdentifier textDocument = {}; |
754 | Position position = {}; |
755 | |
756 | template<typename W> |
757 | void walk(W &w) |
758 | { |
759 | field(w, "textDocument" , textDocument); |
760 | field(w, "position" , position); |
761 | } |
762 | }; |
763 | |
764 | class Q_LANGUAGESERVER_EXPORT DocumentFilter |
765 | { |
766 | public: |
767 | std::optional<QByteArray> language = {}; |
768 | std::optional<QByteArray> scheme = {}; |
769 | std::optional<QByteArray> pattern = {}; |
770 | |
771 | template<typename W> |
772 | void walk(W &w) |
773 | { |
774 | field(w, "language" , language); |
775 | field(w, "scheme" , scheme); |
776 | field(w, "pattern" , pattern); |
777 | } |
778 | }; |
779 | |
780 | using DocumentSelector = QList<DocumentFilter>; |
781 | |
782 | class Q_LANGUAGESERVER_EXPORT StaticRegistrationOptions |
783 | { |
784 | public: |
785 | std::optional<QByteArray> id = {}; |
786 | |
787 | template<typename W> |
788 | void walk(W &w) |
789 | { |
790 | field(w, "id" , id); |
791 | } |
792 | }; |
793 | |
794 | class Q_LANGUAGESERVER_EXPORT TextDocumentRegistrationOptions |
795 | { |
796 | public: |
797 | std::variant<DocumentSelector, std::nullptr_t> documentSelector = nullptr; |
798 | |
799 | template<typename W> |
800 | void walk(W &w) |
801 | { |
802 | field(w, "documentSelector" , documentSelector); |
803 | } |
804 | }; |
805 | |
806 | class Q_LANGUAGESERVER_EXPORT MarkupContent |
807 | { |
808 | public: |
809 | MarkupKind kind = {}; |
810 | QByteArray value = {}; |
811 | |
812 | template<typename W> |
813 | void walk(W &w) |
814 | { |
815 | field(w, "kind" , kind); |
816 | field(w, "value" , value); |
817 | } |
818 | }; |
819 | |
820 | class Q_LANGUAGESERVER_EXPORT MarkdownClientCapabilities |
821 | { |
822 | public: |
823 | QByteArray parser = {}; |
824 | std::optional<QByteArray> version = {}; |
825 | |
826 | template<typename W> |
827 | void walk(W &w) |
828 | { |
829 | field(w, "parser" , parser); |
830 | field(w, "version" , version); |
831 | } |
832 | }; |
833 | |
834 | class Q_LANGUAGESERVER_EXPORT WorkDoneProgressBegin |
835 | { |
836 | public: |
837 | QByteArray kind = {}; |
838 | QByteArray title = {}; |
839 | std::optional<bool> cancellable = {}; |
840 | std::optional<QByteArray> message = {}; |
841 | std::optional<int> percentage = {}; |
842 | |
843 | template<typename W> |
844 | void walk(W &w) |
845 | { |
846 | field(w, "kind" , kind); |
847 | field(w, "title" , title); |
848 | field(w, "cancellable" , cancellable); |
849 | field(w, "message" , message); |
850 | field(w, "percentage" , percentage); |
851 | } |
852 | }; |
853 | |
854 | class Q_LANGUAGESERVER_EXPORT WorkDoneProgressReport |
855 | { |
856 | public: |
857 | QByteArray kind = {}; |
858 | std::optional<bool> cancellable = {}; |
859 | std::optional<QByteArray> message = {}; |
860 | std::optional<int> percentage = {}; |
861 | |
862 | template<typename W> |
863 | void walk(W &w) |
864 | { |
865 | field(w, "kind" , kind); |
866 | field(w, "cancellable" , cancellable); |
867 | field(w, "message" , message); |
868 | field(w, "percentage" , percentage); |
869 | } |
870 | }; |
871 | |
872 | class Q_LANGUAGESERVER_EXPORT WorkDoneProgressEnd |
873 | { |
874 | public: |
875 | QByteArray kind = {}; |
876 | std::optional<QByteArray> message = {}; |
877 | |
878 | template<typename W> |
879 | void walk(W &w) |
880 | { |
881 | field(w, "kind" , kind); |
882 | field(w, "message" , message); |
883 | } |
884 | }; |
885 | |
886 | class Q_LANGUAGESERVER_EXPORT WorkDoneProgressParams |
887 | { |
888 | public: |
889 | std::optional<ProgressToken> workDoneToken = {}; |
890 | |
891 | template<typename W> |
892 | void walk(W &w) |
893 | { |
894 | field(w, "workDoneToken" , workDoneToken); |
895 | } |
896 | }; |
897 | |
898 | class Q_LANGUAGESERVER_EXPORT WorkDoneProgressOptions |
899 | { |
900 | public: |
901 | std::optional<bool> workDoneProgress = {}; |
902 | |
903 | template<typename W> |
904 | void walk(W &w) |
905 | { |
906 | field(w, "workDoneProgress" , workDoneProgress); |
907 | } |
908 | }; |
909 | |
910 | class Q_LANGUAGESERVER_EXPORT PartialResultParams |
911 | { |
912 | public: |
913 | std::optional<ProgressToken> partialResultToken = {}; |
914 | |
915 | template<typename W> |
916 | void walk(W &w) |
917 | { |
918 | field(w, "partialResultToken" , partialResultToken); |
919 | } |
920 | }; |
921 | |
922 | class Q_LANGUAGESERVER_EXPORT TextDocumentSyncClientCapabilities |
923 | { |
924 | public: |
925 | std::optional<bool> dynamicRegistration = {}; |
926 | std::optional<bool> willSave = {}; |
927 | std::optional<bool> willSaveWaitUntil = {}; |
928 | std::optional<bool> didSave = {}; |
929 | |
930 | template<typename W> |
931 | void walk(W &w) |
932 | { |
933 | field(w, "dynamicRegistration" , dynamicRegistration); |
934 | field(w, "willSave" , willSave); |
935 | field(w, "willSaveWaitUntil" , willSaveWaitUntil); |
936 | field(w, "didSave" , didSave); |
937 | } |
938 | }; |
939 | |
940 | class Q_LANGUAGESERVER_EXPORT PublishDiagnosticsClientCapabilities |
941 | { |
942 | public: |
943 | std::optional<bool> relatedInformation = {}; |
944 | std::optional<QJsonObject> tagSupport = {}; |
945 | std::optional<bool> versionSupport = {}; |
946 | std::optional<bool> codeDescriptionSupport = {}; |
947 | std::optional<bool> dataSupport = {}; |
948 | |
949 | template<typename W> |
950 | void walk(W &w) |
951 | { |
952 | field(w, "relatedInformation" , relatedInformation); |
953 | field(w, "tagSupport" , tagSupport); |
954 | field(w, "versionSupport" , versionSupport); |
955 | field(w, "codeDescriptionSupport" , codeDescriptionSupport); |
956 | field(w, "dataSupport" , dataSupport); |
957 | } |
958 | }; |
959 | |
960 | class Q_LANGUAGESERVER_EXPORT CompletionClientCapabilities |
961 | { |
962 | public: |
963 | std::optional<bool> dynamicRegistration = {}; |
964 | std::optional<QJsonObject> completionItem = {}; |
965 | std::optional<QJsonObject> completionItemKind = {}; |
966 | std::optional<bool> contextSupport = {}; |
967 | |
968 | template<typename W> |
969 | void walk(W &w) |
970 | { |
971 | field(w, "dynamicRegistration" , dynamicRegistration); |
972 | field(w, "completionItem" , completionItem); |
973 | field(w, "completionItemKind" , completionItemKind); |
974 | field(w, "contextSupport" , contextSupport); |
975 | } |
976 | }; |
977 | |
978 | class Q_LANGUAGESERVER_EXPORT HoverClientCapabilities |
979 | { |
980 | public: |
981 | std::optional<bool> dynamicRegistration = {}; |
982 | std::optional<QList<MarkupKind>> contentFormat = {}; |
983 | |
984 | template<typename W> |
985 | void walk(W &w) |
986 | { |
987 | field(w, "dynamicRegistration" , dynamicRegistration); |
988 | field(w, "contentFormat" , contentFormat); |
989 | } |
990 | }; |
991 | |
992 | class Q_LANGUAGESERVER_EXPORT SignatureHelpClientCapabilities |
993 | { |
994 | public: |
995 | std::optional<bool> dynamicRegistration = {}; |
996 | std::optional<QJsonObject> signatureInformation = {}; |
997 | std::optional<bool> contextSupport = {}; |
998 | |
999 | template<typename W> |
1000 | void walk(W &w) |
1001 | { |
1002 | field(w, "dynamicRegistration" , dynamicRegistration); |
1003 | field(w, "signatureInformation" , signatureInformation); |
1004 | field(w, "contextSupport" , contextSupport); |
1005 | } |
1006 | }; |
1007 | |
1008 | class Q_LANGUAGESERVER_EXPORT DeclarationClientCapabilities |
1009 | { |
1010 | public: |
1011 | std::optional<bool> dynamicRegistration = {}; |
1012 | std::optional<bool> linkSupport = {}; |
1013 | |
1014 | template<typename W> |
1015 | void walk(W &w) |
1016 | { |
1017 | field(w, "dynamicRegistration" , dynamicRegistration); |
1018 | field(w, "linkSupport" , linkSupport); |
1019 | } |
1020 | }; |
1021 | |
1022 | class Q_LANGUAGESERVER_EXPORT DefinitionClientCapabilities |
1023 | { |
1024 | public: |
1025 | std::optional<bool> dynamicRegistration = {}; |
1026 | std::optional<bool> linkSupport = {}; |
1027 | |
1028 | template<typename W> |
1029 | void walk(W &w) |
1030 | { |
1031 | field(w, "dynamicRegistration" , dynamicRegistration); |
1032 | field(w, "linkSupport" , linkSupport); |
1033 | } |
1034 | }; |
1035 | |
1036 | class Q_LANGUAGESERVER_EXPORT TypeDefinitionClientCapabilities |
1037 | { |
1038 | public: |
1039 | std::optional<bool> dynamicRegistration = {}; |
1040 | std::optional<bool> linkSupport = {}; |
1041 | |
1042 | template<typename W> |
1043 | void walk(W &w) |
1044 | { |
1045 | field(w, "dynamicRegistration" , dynamicRegistration); |
1046 | field(w, "linkSupport" , linkSupport); |
1047 | } |
1048 | }; |
1049 | |
1050 | class Q_LANGUAGESERVER_EXPORT ImplementationClientCapabilities |
1051 | { |
1052 | public: |
1053 | std::optional<bool> dynamicRegistration = {}; |
1054 | std::optional<bool> linkSupport = {}; |
1055 | |
1056 | template<typename W> |
1057 | void walk(W &w) |
1058 | { |
1059 | field(w, "dynamicRegistration" , dynamicRegistration); |
1060 | field(w, "linkSupport" , linkSupport); |
1061 | } |
1062 | }; |
1063 | |
1064 | class Q_LANGUAGESERVER_EXPORT ReferenceClientCapabilities |
1065 | { |
1066 | public: |
1067 | std::optional<bool> dynamicRegistration = {}; |
1068 | |
1069 | template<typename W> |
1070 | void walk(W &w) |
1071 | { |
1072 | field(w, "dynamicRegistration" , dynamicRegistration); |
1073 | } |
1074 | }; |
1075 | |
1076 | class Q_LANGUAGESERVER_EXPORT DocumentHighlightClientCapabilities |
1077 | { |
1078 | public: |
1079 | std::optional<bool> dynamicRegistration = {}; |
1080 | |
1081 | template<typename W> |
1082 | void walk(W &w) |
1083 | { |
1084 | field(w, "dynamicRegistration" , dynamicRegistration); |
1085 | } |
1086 | }; |
1087 | |
1088 | class Q_LANGUAGESERVER_EXPORT DocumentSymbolClientCapabilities |
1089 | { |
1090 | public: |
1091 | std::optional<bool> dynamicRegistration = {}; |
1092 | std::optional<QJsonObject> symbolKind = {}; |
1093 | std::optional<bool> hierarchicalDocumentSymbolSupport = {}; |
1094 | std::optional<QJsonObject> tagSupport = {}; |
1095 | std::optional<bool> labelSupport = {}; |
1096 | |
1097 | template<typename W> |
1098 | void walk(W &w) |
1099 | { |
1100 | field(w, "dynamicRegistration" , dynamicRegistration); |
1101 | field(w, "symbolKind" , symbolKind); |
1102 | field(w, "hierarchicalDocumentSymbolSupport" , hierarchicalDocumentSymbolSupport); |
1103 | field(w, "tagSupport" , tagSupport); |
1104 | field(w, "labelSupport" , labelSupport); |
1105 | } |
1106 | }; |
1107 | |
1108 | class Q_LANGUAGESERVER_EXPORT CodeActionClientCapabilities |
1109 | { |
1110 | public: |
1111 | std::optional<bool> dynamicRegistration = {}; |
1112 | std::optional<QJsonObject> codeActionLiteralSupport = {}; |
1113 | std::optional<bool> isPreferredSupport = {}; |
1114 | std::optional<bool> disabledSupport = {}; |
1115 | std::optional<bool> dataSupport = {}; |
1116 | std::optional<QJsonObject> resolveSupport = {}; |
1117 | std::optional<bool> honorsChangeAnnotations = {}; |
1118 | |
1119 | template<typename W> |
1120 | void walk(W &w) |
1121 | { |
1122 | field(w, "dynamicRegistration" , dynamicRegistration); |
1123 | field(w, "codeActionLiteralSupport" , codeActionLiteralSupport); |
1124 | field(w, "isPreferredSupport" , isPreferredSupport); |
1125 | field(w, "disabledSupport" , disabledSupport); |
1126 | field(w, "dataSupport" , dataSupport); |
1127 | field(w, "resolveSupport" , resolveSupport); |
1128 | field(w, "honorsChangeAnnotations" , honorsChangeAnnotations); |
1129 | } |
1130 | }; |
1131 | |
1132 | class Q_LANGUAGESERVER_EXPORT CodeLensClientCapabilities |
1133 | { |
1134 | public: |
1135 | std::optional<bool> dynamicRegistration = {}; |
1136 | |
1137 | template<typename W> |
1138 | void walk(W &w) |
1139 | { |
1140 | field(w, "dynamicRegistration" , dynamicRegistration); |
1141 | } |
1142 | }; |
1143 | |
1144 | class Q_LANGUAGESERVER_EXPORT DocumentLinkClientCapabilities |
1145 | { |
1146 | public: |
1147 | std::optional<bool> dynamicRegistration = {}; |
1148 | std::optional<bool> tooltipSupport = {}; |
1149 | |
1150 | template<typename W> |
1151 | void walk(W &w) |
1152 | { |
1153 | field(w, "dynamicRegistration" , dynamicRegistration); |
1154 | field(w, "tooltipSupport" , tooltipSupport); |
1155 | } |
1156 | }; |
1157 | |
1158 | class Q_LANGUAGESERVER_EXPORT DocumentColorClientCapabilities |
1159 | { |
1160 | public: |
1161 | std::optional<bool> dynamicRegistration = {}; |
1162 | |
1163 | template<typename W> |
1164 | void walk(W &w) |
1165 | { |
1166 | field(w, "dynamicRegistration" , dynamicRegistration); |
1167 | } |
1168 | }; |
1169 | |
1170 | class Q_LANGUAGESERVER_EXPORT DocumentFormattingClientCapabilities |
1171 | { |
1172 | public: |
1173 | std::optional<bool> dynamicRegistration = {}; |
1174 | |
1175 | template<typename W> |
1176 | void walk(W &w) |
1177 | { |
1178 | field(w, "dynamicRegistration" , dynamicRegistration); |
1179 | } |
1180 | }; |
1181 | |
1182 | class Q_LANGUAGESERVER_EXPORT DocumentRangeFormattingClientCapabilities |
1183 | { |
1184 | public: |
1185 | std::optional<bool> dynamicRegistration = {}; |
1186 | |
1187 | template<typename W> |
1188 | void walk(W &w) |
1189 | { |
1190 | field(w, "dynamicRegistration" , dynamicRegistration); |
1191 | } |
1192 | }; |
1193 | |
1194 | class Q_LANGUAGESERVER_EXPORT DocumentOnTypeFormattingClientCapabilities |
1195 | { |
1196 | public: |
1197 | std::optional<bool> dynamicRegistration = {}; |
1198 | |
1199 | template<typename W> |
1200 | void walk(W &w) |
1201 | { |
1202 | field(w, "dynamicRegistration" , dynamicRegistration); |
1203 | } |
1204 | }; |
1205 | |
1206 | class Q_LANGUAGESERVER_EXPORT RenameClientCapabilities |
1207 | { |
1208 | public: |
1209 | std::optional<bool> dynamicRegistration = {}; |
1210 | std::optional<bool> prepareSupport = {}; |
1211 | std::optional<QJsonValue> prepareSupportDefaultBehavior = {}; |
1212 | std::optional<bool> honorsChangeAnnotations = {}; |
1213 | |
1214 | template<typename W> |
1215 | void walk(W &w) |
1216 | { |
1217 | field(w, "dynamicRegistration" , dynamicRegistration); |
1218 | field(w, "prepareSupport" , prepareSupport); |
1219 | field(w, "prepareSupportDefaultBehavior" , prepareSupportDefaultBehavior); |
1220 | field(w, "honorsChangeAnnotations" , honorsChangeAnnotations); |
1221 | } |
1222 | }; |
1223 | |
1224 | class Q_LANGUAGESERVER_EXPORT FoldingRangeClientCapabilities |
1225 | { |
1226 | public: |
1227 | std::optional<bool> dynamicRegistration = {}; |
1228 | std::optional<int> rangeLimit = {}; |
1229 | std::optional<bool> lineFoldingOnly = {}; |
1230 | |
1231 | template<typename W> |
1232 | void walk(W &w) |
1233 | { |
1234 | field(w, "dynamicRegistration" , dynamicRegistration); |
1235 | field(w, "rangeLimit" , rangeLimit); |
1236 | field(w, "lineFoldingOnly" , lineFoldingOnly); |
1237 | } |
1238 | }; |
1239 | |
1240 | class Q_LANGUAGESERVER_EXPORT SelectionRangeClientCapabilities |
1241 | { |
1242 | public: |
1243 | std::optional<bool> dynamicRegistration = {}; |
1244 | |
1245 | template<typename W> |
1246 | void walk(W &w) |
1247 | { |
1248 | field(w, "dynamicRegistration" , dynamicRegistration); |
1249 | } |
1250 | }; |
1251 | |
1252 | class Q_LANGUAGESERVER_EXPORT CallHierarchyClientCapabilities |
1253 | { |
1254 | public: |
1255 | std::optional<bool> dynamicRegistration = {}; |
1256 | |
1257 | template<typename W> |
1258 | void walk(W &w) |
1259 | { |
1260 | field(w, "dynamicRegistration" , dynamicRegistration); |
1261 | } |
1262 | }; |
1263 | |
1264 | class Q_LANGUAGESERVER_EXPORT SemanticTokensClientCapabilities |
1265 | { |
1266 | public: |
1267 | std::optional<bool> dynamicRegistration = {}; |
1268 | |
1269 | class Q_LANGUAGESERVER_EXPORT Requests |
1270 | { |
1271 | public: |
1272 | std::optional<std::variant<bool, QJsonObject>> range = {}; |
1273 | std::optional<std::variant<bool, QJsonObject>> full = {}; |
1274 | |
1275 | template<typename W> |
1276 | void walk(W &w) |
1277 | { |
1278 | field(w, "range" , range); |
1279 | field(w, "full" , full); |
1280 | } |
1281 | }; |
1282 | |
1283 | Requests requests = {}; |
1284 | QList<QByteArray> tokenTypes = {}; |
1285 | QList<QByteArray> tokenModifiers = {}; |
1286 | QList<QByteArray> formats = {}; |
1287 | std::optional<bool> overlappingTokenSupport = {}; |
1288 | std::optional<bool> multilineTokenSupport = {}; |
1289 | |
1290 | template<typename W> |
1291 | void walk(W &w) |
1292 | { |
1293 | field(w, "dynamicRegistration" , dynamicRegistration); |
1294 | field(w, "requests" , requests); |
1295 | field(w, "tokenTypes" , tokenTypes); |
1296 | field(w, "tokenModifiers" , tokenModifiers); |
1297 | field(w, "formats" , formats); |
1298 | field(w, "overlappingTokenSupport" , overlappingTokenSupport); |
1299 | field(w, "multilineTokenSupport" , multilineTokenSupport); |
1300 | } |
1301 | }; |
1302 | |
1303 | class Q_LANGUAGESERVER_EXPORT LinkedEditingRangeClientCapabilities |
1304 | { |
1305 | public: |
1306 | std::optional<bool> dynamicRegistration = {}; |
1307 | |
1308 | template<typename W> |
1309 | void walk(W &w) |
1310 | { |
1311 | field(w, "dynamicRegistration" , dynamicRegistration); |
1312 | } |
1313 | }; |
1314 | |
1315 | class Q_LANGUAGESERVER_EXPORT MonikerClientCapabilities |
1316 | { |
1317 | public: |
1318 | std::optional<bool> dynamicRegistration = {}; |
1319 | |
1320 | template<typename W> |
1321 | void walk(W &w) |
1322 | { |
1323 | field(w, "dynamicRegistration" , dynamicRegistration); |
1324 | } |
1325 | }; |
1326 | |
1327 | class Q_LANGUAGESERVER_EXPORT TextDocumentClientCapabilities |
1328 | { |
1329 | public: |
1330 | std::optional<TextDocumentSyncClientCapabilities> synchronization = {}; |
1331 | std::optional<CompletionClientCapabilities> completion = {}; |
1332 | std::optional<HoverClientCapabilities> hover = {}; |
1333 | std::optional<SignatureHelpClientCapabilities> signatureHelp = {}; |
1334 | std::optional<DeclarationClientCapabilities> declaration = {}; |
1335 | std::optional<DefinitionClientCapabilities> definition = {}; |
1336 | std::optional<TypeDefinitionClientCapabilities> typeDefinition = {}; |
1337 | std::optional<ImplementationClientCapabilities> implementation = {}; |
1338 | std::optional<ReferenceClientCapabilities> references = {}; |
1339 | std::optional<DocumentHighlightClientCapabilities> documentHighlight = {}; |
1340 | std::optional<DocumentSymbolClientCapabilities> documentSymbol = {}; |
1341 | std::optional<CodeActionClientCapabilities> codeAction = {}; |
1342 | std::optional<CodeLensClientCapabilities> codeLens = {}; |
1343 | std::optional<DocumentLinkClientCapabilities> documentLink = {}; |
1344 | std::optional<DocumentColorClientCapabilities> colorProvider = {}; |
1345 | std::optional<DocumentFormattingClientCapabilities> formatting = {}; |
1346 | std::optional<DocumentRangeFormattingClientCapabilities> rangeFormatting = {}; |
1347 | std::optional<DocumentOnTypeFormattingClientCapabilities> onTypeFormatting = {}; |
1348 | std::optional<RenameClientCapabilities> rename = {}; |
1349 | std::optional<PublishDiagnosticsClientCapabilities> publishDiagnostics = {}; |
1350 | std::optional<FoldingRangeClientCapabilities> foldingRange = {}; |
1351 | std::optional<SelectionRangeClientCapabilities> selectionRange = {}; |
1352 | std::optional<LinkedEditingRangeClientCapabilities> linkedEditingRange = {}; |
1353 | std::optional<CallHierarchyClientCapabilities> callHierarchy = {}; |
1354 | std::optional<SemanticTokensClientCapabilities> semanticTokens = {}; |
1355 | std::optional<MonikerClientCapabilities> moniker = {}; |
1356 | |
1357 | template<typename W> |
1358 | void walk(W &w) |
1359 | { |
1360 | field(w, "synchronization" , synchronization); |
1361 | field(w, "completion" , completion); |
1362 | field(w, "hover" , hover); |
1363 | field(w, "signatureHelp" , signatureHelp); |
1364 | field(w, "declaration" , declaration); |
1365 | field(w, "definition" , definition); |
1366 | field(w, "typeDefinition" , typeDefinition); |
1367 | field(w, "implementation" , implementation); |
1368 | field(w, "references" , references); |
1369 | field(w, "documentHighlight" , documentHighlight); |
1370 | field(w, "documentSymbol" , documentSymbol); |
1371 | field(w, "codeAction" , codeAction); |
1372 | field(w, "codeLens" , codeLens); |
1373 | field(w, "documentLink" , documentLink); |
1374 | field(w, "colorProvider" , colorProvider); |
1375 | field(w, "formatting" , formatting); |
1376 | field(w, "rangeFormatting" , rangeFormatting); |
1377 | field(w, "onTypeFormatting" , onTypeFormatting); |
1378 | field(w, "rename" , rename); |
1379 | field(w, "publishDiagnostics" , publishDiagnostics); |
1380 | field(w, "foldingRange" , foldingRange); |
1381 | field(w, "selectionRange" , selectionRange); |
1382 | field(w, "linkedEditingRange" , linkedEditingRange); |
1383 | field(w, "callHierarchy" , callHierarchy); |
1384 | field(w, "semanticTokens" , semanticTokens); |
1385 | field(w, "moniker" , moniker); |
1386 | } |
1387 | }; |
1388 | |
1389 | class Q_LANGUAGESERVER_EXPORT ShowMessageRequestClientCapabilities |
1390 | { |
1391 | public: |
1392 | std::optional<QJsonObject> messageActionItem = {}; |
1393 | |
1394 | template<typename W> |
1395 | void walk(W &w) |
1396 | { |
1397 | field(w, "messageActionItem" , messageActionItem); |
1398 | } |
1399 | }; |
1400 | |
1401 | class Q_LANGUAGESERVER_EXPORT ShowDocumentClientCapabilities |
1402 | { |
1403 | public: |
1404 | bool support = {}; |
1405 | |
1406 | template<typename W> |
1407 | void walk(W &w) |
1408 | { |
1409 | field(w, "support" , support); |
1410 | } |
1411 | }; |
1412 | |
1413 | class Q_LANGUAGESERVER_EXPORT DidChangeConfigurationClientCapabilities |
1414 | { |
1415 | public: |
1416 | std::optional<bool> dynamicRegistration = {}; |
1417 | |
1418 | template<typename W> |
1419 | void walk(W &w) |
1420 | { |
1421 | field(w, "dynamicRegistration" , dynamicRegistration); |
1422 | } |
1423 | }; |
1424 | |
1425 | class Q_LANGUAGESERVER_EXPORT ClientCapabilities |
1426 | { |
1427 | public: |
1428 | std::optional<QJsonObject> workspace = {}; |
1429 | std::optional<TextDocumentClientCapabilities> textDocument = {}; |
1430 | std::optional<QJsonObject> window = {}; |
1431 | std::optional<QJsonObject> general = {}; |
1432 | std::optional<QJsonValue> experimental = {}; |
1433 | |
1434 | template<typename W> |
1435 | void walk(W &w) |
1436 | { |
1437 | field(w, "workspace" , workspace); |
1438 | field(w, "textDocument" , textDocument); |
1439 | field(w, "window" , window); |
1440 | field(w, "general" , general); |
1441 | field(w, "experimental" , experimental); |
1442 | } |
1443 | }; |
1444 | |
1445 | class Q_LANGUAGESERVER_EXPORT WorkspaceFolder |
1446 | { |
1447 | public: |
1448 | QByteArray uri = {}; |
1449 | QByteArray name = {}; |
1450 | |
1451 | template<typename W> |
1452 | void walk(W &w) |
1453 | { |
1454 | field(w, "uri" , uri); |
1455 | field(w, "name" , name); |
1456 | } |
1457 | }; |
1458 | |
1459 | class Q_LANGUAGESERVER_EXPORT InitializeParams : public WorkDoneProgressParams |
1460 | { |
1461 | public: |
1462 | std::variant<int, std::nullptr_t> processId = nullptr; |
1463 | std::optional<QJsonObject> clientInfo = {}; |
1464 | std::optional<QByteArray> locale = {}; |
1465 | std::optional<std::variant<QByteArray, std::nullptr_t>> rootPath = nullptr; |
1466 | std::variant<QByteArray, std::nullptr_t> rootUri = nullptr; |
1467 | std::optional<QJsonValue> initializationOptions = {}; |
1468 | ClientCapabilities capabilities = {}; |
1469 | std::optional<TraceValue> trace = {}; |
1470 | std::optional<std::variant<QList<WorkspaceFolder>, std::nullptr_t>> workspaceFolders = nullptr; |
1471 | |
1472 | template<typename W> |
1473 | void walk(W &w) |
1474 | { |
1475 | WorkDoneProgressParams::walk(w); |
1476 | field(w, "processId" , processId); |
1477 | field(w, "clientInfo" , clientInfo); |
1478 | field(w, "locale" , locale); |
1479 | field(w, "rootPath" , rootPath); |
1480 | field(w, "rootUri" , rootUri); |
1481 | field(w, "initializationOptions" , initializationOptions); |
1482 | field(w, "capabilities" , capabilities); |
1483 | field(w, "trace" , trace); |
1484 | field(w, "workspaceFolders" , workspaceFolders); |
1485 | } |
1486 | }; |
1487 | |
1488 | class Q_LANGUAGESERVER_EXPORT |
1489 | { |
1490 | public: |
1491 | std::optional<bool> = {}; |
1492 | std::optional<std::variant<QByteArray, bool>> = {}; |
1493 | |
1494 | template<typename W> |
1495 | void (W &w) |
1496 | { |
1497 | field(w, "supported" , supported); |
1498 | field(w, "changeNotifications" , changeNotifications); |
1499 | } |
1500 | }; |
1501 | |
1502 | class Q_LANGUAGESERVER_EXPORT WorkspaceSymbolOptions : public WorkDoneProgressOptions |
1503 | { |
1504 | public: |
1505 | template<typename W> |
1506 | void walk(W &w) |
1507 | { |
1508 | WorkDoneProgressOptions::walk(w); |
1509 | } |
1510 | }; |
1511 | |
1512 | class Q_LANGUAGESERVER_EXPORT ExecuteCommandOptions : public WorkDoneProgressOptions |
1513 | { |
1514 | public: |
1515 | QList<QByteArray> commands = {}; |
1516 | |
1517 | template<typename W> |
1518 | void walk(W &w) |
1519 | { |
1520 | WorkDoneProgressOptions::walk(w); |
1521 | field(w, "commands" , commands); |
1522 | } |
1523 | }; |
1524 | |
1525 | class Q_LANGUAGESERVER_EXPORT FileOperationPatternOptions |
1526 | { |
1527 | public: |
1528 | std::optional<bool> ignoreCase = {}; |
1529 | |
1530 | template<typename W> |
1531 | void walk(W &w) |
1532 | { |
1533 | field(w, "ignoreCase" , ignoreCase); |
1534 | } |
1535 | }; |
1536 | |
1537 | class Q_LANGUAGESERVER_EXPORT FileOperationPattern |
1538 | { |
1539 | public: |
1540 | QByteArray glob = {}; |
1541 | std::optional<FileOperationPatternKind> matches = {}; |
1542 | std::optional<FileOperationPatternOptions> options = {}; |
1543 | |
1544 | template<typename W> |
1545 | void walk(W &w) |
1546 | { |
1547 | field(w, "glob" , glob); |
1548 | field(w, "matches" , matches); |
1549 | field(w, "options" , options); |
1550 | } |
1551 | }; |
1552 | |
1553 | class Q_LANGUAGESERVER_EXPORT FileOperationFilter |
1554 | { |
1555 | public: |
1556 | std::optional<QByteArray> scheme = {}; |
1557 | FileOperationPattern pattern = {}; |
1558 | |
1559 | template<typename W> |
1560 | void walk(W &w) |
1561 | { |
1562 | field(w, "scheme" , scheme); |
1563 | field(w, "pattern" , pattern); |
1564 | } |
1565 | }; |
1566 | |
1567 | class Q_LANGUAGESERVER_EXPORT FileOperationRegistrationOptions |
1568 | { |
1569 | public: |
1570 | QList<FileOperationFilter> filters = {}; |
1571 | |
1572 | template<typename W> |
1573 | void walk(W &w) |
1574 | { |
1575 | field(w, "filters" , filters); |
1576 | } |
1577 | }; |
1578 | |
1579 | class Q_LANGUAGESERVER_EXPORT TextDocumentSyncOptions |
1580 | { |
1581 | public: |
1582 | std::optional<bool> openClose = {}; |
1583 | std::optional<TextDocumentSyncKind> change = {}; |
1584 | |
1585 | template<typename W> |
1586 | void walk(W &w) |
1587 | { |
1588 | field(w, "openClose" , openClose); |
1589 | field(w, "change" , change); |
1590 | } |
1591 | }; |
1592 | |
1593 | class Q_LANGUAGESERVER_EXPORT CompletionOptions : public WorkDoneProgressOptions |
1594 | { |
1595 | public: |
1596 | std::optional<QList<QByteArray>> triggerCharacters = {}; |
1597 | std::optional<QList<QByteArray>> allCommitCharacters = {}; |
1598 | std::optional<bool> resolveProvider = {}; |
1599 | |
1600 | template<typename W> |
1601 | void walk(W &w) |
1602 | { |
1603 | WorkDoneProgressOptions::walk(w); |
1604 | field(w, "triggerCharacters" , triggerCharacters); |
1605 | field(w, "allCommitCharacters" , allCommitCharacters); |
1606 | field(w, "resolveProvider" , resolveProvider); |
1607 | } |
1608 | }; |
1609 | |
1610 | class Q_LANGUAGESERVER_EXPORT HoverOptions : public WorkDoneProgressOptions |
1611 | { |
1612 | public: |
1613 | template<typename W> |
1614 | void walk(W &w) |
1615 | { |
1616 | WorkDoneProgressOptions::walk(w); |
1617 | } |
1618 | }; |
1619 | |
1620 | class Q_LANGUAGESERVER_EXPORT SignatureHelpOptions : public WorkDoneProgressOptions |
1621 | { |
1622 | public: |
1623 | std::optional<QList<QByteArray>> triggerCharacters = {}; |
1624 | std::optional<QList<QByteArray>> retriggerCharacters = {}; |
1625 | |
1626 | template<typename W> |
1627 | void walk(W &w) |
1628 | { |
1629 | WorkDoneProgressOptions::walk(w); |
1630 | field(w, "triggerCharacters" , triggerCharacters); |
1631 | field(w, "retriggerCharacters" , retriggerCharacters); |
1632 | } |
1633 | }; |
1634 | |
1635 | class Q_LANGUAGESERVER_EXPORT DeclarationOptions : public WorkDoneProgressOptions |
1636 | { |
1637 | public: |
1638 | template<typename W> |
1639 | void walk(W &w) |
1640 | { |
1641 | WorkDoneProgressOptions::walk(w); |
1642 | } |
1643 | }; |
1644 | |
1645 | class Q_LANGUAGESERVER_EXPORT DeclarationRegistrationOptions : public DeclarationOptions, |
1646 | TextDocumentRegistrationOptions, |
1647 | StaticRegistrationOptions |
1648 | { |
1649 | public: |
1650 | template<typename W> |
1651 | void walk(W &w) |
1652 | { |
1653 | DeclarationOptions::walk(w); |
1654 | TextDocumentRegistrationOptions::walk(w); |
1655 | StaticRegistrationOptions::walk(w); |
1656 | } |
1657 | }; |
1658 | |
1659 | class Q_LANGUAGESERVER_EXPORT DefinitionOptions : public WorkDoneProgressOptions |
1660 | { |
1661 | public: |
1662 | template<typename W> |
1663 | void walk(W &w) |
1664 | { |
1665 | WorkDoneProgressOptions::walk(w); |
1666 | } |
1667 | }; |
1668 | |
1669 | class Q_LANGUAGESERVER_EXPORT TypeDefinitionOptions : public WorkDoneProgressOptions |
1670 | { |
1671 | public: |
1672 | template<typename W> |
1673 | void walk(W &w) |
1674 | { |
1675 | WorkDoneProgressOptions::walk(w); |
1676 | } |
1677 | }; |
1678 | |
1679 | class Q_LANGUAGESERVER_EXPORT TypeDefinitionRegistrationOptions |
1680 | : public TextDocumentRegistrationOptions, |
1681 | TypeDefinitionOptions, |
1682 | StaticRegistrationOptions |
1683 | { |
1684 | public: |
1685 | template<typename W> |
1686 | void walk(W &w) |
1687 | { |
1688 | TextDocumentRegistrationOptions::walk(w); |
1689 | TypeDefinitionOptions::walk(w); |
1690 | StaticRegistrationOptions::walk(w); |
1691 | } |
1692 | }; |
1693 | |
1694 | class Q_LANGUAGESERVER_EXPORT ImplementationOptions : public WorkDoneProgressOptions |
1695 | { |
1696 | public: |
1697 | template<typename W> |
1698 | void walk(W &w) |
1699 | { |
1700 | WorkDoneProgressOptions::walk(w); |
1701 | } |
1702 | }; |
1703 | |
1704 | class Q_LANGUAGESERVER_EXPORT ImplementationRegistrationOptions |
1705 | : public TextDocumentRegistrationOptions, |
1706 | ImplementationOptions, |
1707 | StaticRegistrationOptions |
1708 | { |
1709 | public: |
1710 | template<typename W> |
1711 | void walk(W &w) |
1712 | { |
1713 | TextDocumentRegistrationOptions::walk(w); |
1714 | ImplementationOptions::walk(w); |
1715 | StaticRegistrationOptions::walk(w); |
1716 | } |
1717 | }; |
1718 | |
1719 | class Q_LANGUAGESERVER_EXPORT ReferenceOptions : public WorkDoneProgressOptions |
1720 | { |
1721 | public: |
1722 | template<typename W> |
1723 | void walk(W &w) |
1724 | { |
1725 | WorkDoneProgressOptions::walk(w); |
1726 | } |
1727 | }; |
1728 | |
1729 | class Q_LANGUAGESERVER_EXPORT DocumentHighlightOptions : public WorkDoneProgressOptions |
1730 | { |
1731 | public: |
1732 | template<typename W> |
1733 | void walk(W &w) |
1734 | { |
1735 | WorkDoneProgressOptions::walk(w); |
1736 | } |
1737 | }; |
1738 | |
1739 | class Q_LANGUAGESERVER_EXPORT DocumentSymbolOptions : public WorkDoneProgressOptions |
1740 | { |
1741 | public: |
1742 | std::optional<QByteArray> label = {}; |
1743 | |
1744 | template<typename W> |
1745 | void walk(W &w) |
1746 | { |
1747 | WorkDoneProgressOptions::walk(w); |
1748 | field(w, "label" , label); |
1749 | } |
1750 | }; |
1751 | |
1752 | class Q_LANGUAGESERVER_EXPORT CodeActionOptions : public WorkDoneProgressOptions |
1753 | { |
1754 | public: |
1755 | std::optional<QList<QByteArray>> codeActionKinds = {}; |
1756 | std::optional<bool> resolveProvider = {}; |
1757 | |
1758 | template<typename W> |
1759 | void walk(W &w) |
1760 | { |
1761 | WorkDoneProgressOptions::walk(w); |
1762 | field(w, "codeActionKinds" , codeActionKinds); |
1763 | field(w, "resolveProvider" , resolveProvider); |
1764 | } |
1765 | }; |
1766 | |
1767 | class Q_LANGUAGESERVER_EXPORT CodeLensOptions : public WorkDoneProgressOptions |
1768 | { |
1769 | public: |
1770 | std::optional<bool> resolveProvider = {}; |
1771 | |
1772 | template<typename W> |
1773 | void walk(W &w) |
1774 | { |
1775 | WorkDoneProgressOptions::walk(w); |
1776 | field(w, "resolveProvider" , resolveProvider); |
1777 | } |
1778 | }; |
1779 | |
1780 | class Q_LANGUAGESERVER_EXPORT DocumentLinkOptions : public WorkDoneProgressOptions |
1781 | { |
1782 | public: |
1783 | std::optional<bool> resolveProvider = {}; |
1784 | |
1785 | template<typename W> |
1786 | void walk(W &w) |
1787 | { |
1788 | WorkDoneProgressOptions::walk(w); |
1789 | field(w, "resolveProvider" , resolveProvider); |
1790 | } |
1791 | }; |
1792 | |
1793 | class Q_LANGUAGESERVER_EXPORT DocumentColorOptions : public WorkDoneProgressOptions |
1794 | { |
1795 | public: |
1796 | template<typename W> |
1797 | void walk(W &w) |
1798 | { |
1799 | WorkDoneProgressOptions::walk(w); |
1800 | } |
1801 | }; |
1802 | |
1803 | class Q_LANGUAGESERVER_EXPORT DocumentColorRegistrationOptions |
1804 | : public TextDocumentRegistrationOptions, |
1805 | StaticRegistrationOptions, |
1806 | DocumentColorOptions |
1807 | { |
1808 | public: |
1809 | template<typename W> |
1810 | void walk(W &w) |
1811 | { |
1812 | TextDocumentRegistrationOptions::walk(w); |
1813 | StaticRegistrationOptions::walk(w); |
1814 | DocumentColorOptions::walk(w); |
1815 | } |
1816 | }; |
1817 | |
1818 | class Q_LANGUAGESERVER_EXPORT DocumentFormattingOptions : public WorkDoneProgressOptions |
1819 | { |
1820 | public: |
1821 | template<typename W> |
1822 | void walk(W &w) |
1823 | { |
1824 | WorkDoneProgressOptions::walk(w); |
1825 | } |
1826 | }; |
1827 | |
1828 | class Q_LANGUAGESERVER_EXPORT DocumentRangeFormattingOptions : public WorkDoneProgressOptions |
1829 | { |
1830 | public: |
1831 | template<typename W> |
1832 | void walk(W &w) |
1833 | { |
1834 | WorkDoneProgressOptions::walk(w); |
1835 | } |
1836 | }; |
1837 | |
1838 | class Q_LANGUAGESERVER_EXPORT DocumentOnTypeFormattingOptions |
1839 | { |
1840 | public: |
1841 | QByteArray firstTriggerCharacter = {}; |
1842 | std::optional<QList<QByteArray>> moreTriggerCharacter = {}; |
1843 | |
1844 | template<typename W> |
1845 | void walk(W &w) |
1846 | { |
1847 | field(w, "firstTriggerCharacter" , firstTriggerCharacter); |
1848 | field(w, "moreTriggerCharacter" , moreTriggerCharacter); |
1849 | } |
1850 | }; |
1851 | |
1852 | class Q_LANGUAGESERVER_EXPORT RenameOptions : public WorkDoneProgressOptions |
1853 | { |
1854 | public: |
1855 | std::optional<bool> prepareProvider = {}; |
1856 | |
1857 | template<typename W> |
1858 | void walk(W &w) |
1859 | { |
1860 | WorkDoneProgressOptions::walk(w); |
1861 | field(w, "prepareProvider" , prepareProvider); |
1862 | } |
1863 | }; |
1864 | |
1865 | class Q_LANGUAGESERVER_EXPORT FoldingRangeOptions : public WorkDoneProgressOptions |
1866 | { |
1867 | public: |
1868 | template<typename W> |
1869 | void walk(W &w) |
1870 | { |
1871 | WorkDoneProgressOptions::walk(w); |
1872 | } |
1873 | }; |
1874 | |
1875 | class Q_LANGUAGESERVER_EXPORT FoldingRangeRegistrationOptions |
1876 | : public TextDocumentRegistrationOptions, |
1877 | FoldingRangeOptions, |
1878 | StaticRegistrationOptions |
1879 | { |
1880 | public: |
1881 | template<typename W> |
1882 | void walk(W &w) |
1883 | { |
1884 | TextDocumentRegistrationOptions::walk(w); |
1885 | FoldingRangeOptions::walk(w); |
1886 | StaticRegistrationOptions::walk(w); |
1887 | } |
1888 | }; |
1889 | |
1890 | class Q_LANGUAGESERVER_EXPORT SelectionRangeOptions : public WorkDoneProgressOptions |
1891 | { |
1892 | public: |
1893 | template<typename W> |
1894 | void walk(W &w) |
1895 | { |
1896 | WorkDoneProgressOptions::walk(w); |
1897 | } |
1898 | }; |
1899 | |
1900 | class Q_LANGUAGESERVER_EXPORT SelectionRangeRegistrationOptions : public SelectionRangeOptions, |
1901 | TextDocumentRegistrationOptions, |
1902 | StaticRegistrationOptions |
1903 | { |
1904 | public: |
1905 | template<typename W> |
1906 | void walk(W &w) |
1907 | { |
1908 | SelectionRangeOptions::walk(w); |
1909 | TextDocumentRegistrationOptions::walk(w); |
1910 | StaticRegistrationOptions::walk(w); |
1911 | } |
1912 | }; |
1913 | |
1914 | class Q_LANGUAGESERVER_EXPORT CallHierarchyOptions : public WorkDoneProgressOptions |
1915 | { |
1916 | public: |
1917 | template<typename W> |
1918 | void walk(W &w) |
1919 | { |
1920 | WorkDoneProgressOptions::walk(w); |
1921 | } |
1922 | }; |
1923 | |
1924 | class Q_LANGUAGESERVER_EXPORT CallHierarchyRegistrationOptions |
1925 | : public TextDocumentRegistrationOptions, |
1926 | CallHierarchyOptions, |
1927 | StaticRegistrationOptions |
1928 | { |
1929 | public: |
1930 | template<typename W> |
1931 | void walk(W &w) |
1932 | { |
1933 | TextDocumentRegistrationOptions::walk(w); |
1934 | CallHierarchyOptions::walk(w); |
1935 | StaticRegistrationOptions::walk(w); |
1936 | } |
1937 | }; |
1938 | |
1939 | class Q_LANGUAGESERVER_EXPORT SemanticTokensLegend |
1940 | { |
1941 | public: |
1942 | QList<QByteArray> tokenTypes = {}; |
1943 | QList<QByteArray> tokenModifiers = {}; |
1944 | |
1945 | template<typename W> |
1946 | void walk(W &w) |
1947 | { |
1948 | field(w, "tokenTypes" , tokenTypes); |
1949 | field(w, "tokenModifiers" , tokenModifiers); |
1950 | } |
1951 | }; |
1952 | |
1953 | class Q_LANGUAGESERVER_EXPORT SemanticTokensOptions : public WorkDoneProgressOptions |
1954 | { |
1955 | public: |
1956 | SemanticTokensLegend legend = {}; |
1957 | std::optional<std::variant<bool, QJsonObject>> range = {}; |
1958 | std::optional<std::variant<bool, QJsonObject>> full = {}; |
1959 | |
1960 | template<typename W> |
1961 | void walk(W &w) |
1962 | { |
1963 | WorkDoneProgressOptions::walk(w); |
1964 | field(w, "legend" , legend); |
1965 | field(w, "range" , range); |
1966 | field(w, "full" , full); |
1967 | } |
1968 | }; |
1969 | |
1970 | class Q_LANGUAGESERVER_EXPORT SemanticTokensRegistrationOptions |
1971 | : public TextDocumentRegistrationOptions, |
1972 | SemanticTokensOptions, |
1973 | StaticRegistrationOptions |
1974 | { |
1975 | public: |
1976 | template<typename W> |
1977 | void walk(W &w) |
1978 | { |
1979 | TextDocumentRegistrationOptions::walk(w); |
1980 | SemanticTokensOptions::walk(w); |
1981 | StaticRegistrationOptions::walk(w); |
1982 | } |
1983 | }; |
1984 | |
1985 | class Q_LANGUAGESERVER_EXPORT LinkedEditingRangeOptions : public WorkDoneProgressOptions |
1986 | { |
1987 | public: |
1988 | template<typename W> |
1989 | void walk(W &w) |
1990 | { |
1991 | WorkDoneProgressOptions::walk(w); |
1992 | } |
1993 | }; |
1994 | |
1995 | class Q_LANGUAGESERVER_EXPORT LinkedEditingRangeRegistrationOptions |
1996 | : public TextDocumentRegistrationOptions, |
1997 | LinkedEditingRangeOptions, |
1998 | StaticRegistrationOptions |
1999 | { |
2000 | public: |
2001 | template<typename W> |
2002 | void walk(W &w) |
2003 | { |
2004 | TextDocumentRegistrationOptions::walk(w); |
2005 | LinkedEditingRangeOptions::walk(w); |
2006 | StaticRegistrationOptions::walk(w); |
2007 | } |
2008 | }; |
2009 | |
2010 | class Q_LANGUAGESERVER_EXPORT MonikerOptions : public WorkDoneProgressOptions |
2011 | { |
2012 | public: |
2013 | template<typename W> |
2014 | void walk(W &w) |
2015 | { |
2016 | WorkDoneProgressOptions::walk(w); |
2017 | } |
2018 | }; |
2019 | |
2020 | class Q_LANGUAGESERVER_EXPORT MonikerRegistrationOptions : public TextDocumentRegistrationOptions, |
2021 | MonikerOptions |
2022 | { |
2023 | public: |
2024 | template<typename W> |
2025 | void walk(W &w) |
2026 | { |
2027 | TextDocumentRegistrationOptions::walk(w); |
2028 | MonikerOptions::walk(w); |
2029 | } |
2030 | }; |
2031 | |
2032 | class Q_LANGUAGESERVER_EXPORT ServerCapabilities |
2033 | { |
2034 | public: |
2035 | std::optional<std::variant<TextDocumentSyncOptions, TextDocumentSyncKind>> |
2036 | textDocumentSync = {}; |
2037 | std::optional<CompletionOptions> completionProvider = {}; |
2038 | std::optional<std::variant<bool, HoverOptions>> hoverProvider = {}; |
2039 | std::optional<SignatureHelpOptions> signatureHelpProvider = {}; |
2040 | std::optional<std::variant<bool, DeclarationOptions, DeclarationRegistrationOptions>> |
2041 | declarationProvider = {}; |
2042 | std::optional<std::variant<bool, DefinitionOptions>> definitionProvider = {}; |
2043 | std::optional<std::variant<bool, TypeDefinitionOptions, TypeDefinitionRegistrationOptions>> |
2044 | typeDefinitionProvider = {}; |
2045 | std::optional<std::variant<bool, ImplementationOptions, ImplementationRegistrationOptions>> |
2046 | implementationProvider = {}; |
2047 | std::optional<std::variant<bool, ReferenceOptions>> referencesProvider = {}; |
2048 | std::optional<std::variant<bool, DocumentHighlightOptions>> documentHighlightProvider = {}; |
2049 | std::optional<std::variant<bool, DocumentSymbolOptions>> documentSymbolProvider = {}; |
2050 | std::optional<std::variant<bool, CodeActionOptions>> codeActionProvider = {}; |
2051 | std::optional<CodeLensOptions> codeLensProvider = {}; |
2052 | std::optional<DocumentLinkOptions> documentLinkProvider = {}; |
2053 | std::optional<std::variant<bool, DocumentColorOptions, DocumentColorRegistrationOptions>> |
2054 | colorProvider = {}; |
2055 | std::optional<std::variant<bool, DocumentFormattingOptions>> documentFormattingProvider = {}; |
2056 | std::optional<std::variant<bool, DocumentRangeFormattingOptions>> |
2057 | documentRangeFormattingProvider = {}; |
2058 | std::optional<DocumentOnTypeFormattingOptions> documentOnTypeFormattingProvider = {}; |
2059 | std::optional<std::variant<bool, RenameOptions>> renameProvider = {}; |
2060 | std::optional<std::variant<bool, FoldingRangeOptions, FoldingRangeRegistrationOptions>> |
2061 | foldingRangeProvider = {}; |
2062 | std::optional<ExecuteCommandOptions> executeCommandProvider = {}; |
2063 | std::optional<std::variant<bool, SelectionRangeOptions, SelectionRangeRegistrationOptions>> |
2064 | selectionRangeProvider = {}; |
2065 | std::optional< |
2066 | std::variant<bool, LinkedEditingRangeOptions, LinkedEditingRangeRegistrationOptions>> |
2067 | linkedEditingRangeProvider = {}; |
2068 | std::optional<std::variant<bool, CallHierarchyOptions, CallHierarchyRegistrationOptions>> |
2069 | callHierarchyProvider = {}; |
2070 | std::optional<std::variant<SemanticTokensOptions, SemanticTokensRegistrationOptions>> |
2071 | semanticTokensProvider = {}; |
2072 | std::optional<std::variant<bool, MonikerOptions, MonikerRegistrationOptions>> |
2073 | monikerProvider = {}; |
2074 | std::optional<std::variant<bool, WorkspaceSymbolOptions>> workspaceSymbolProvider = {}; |
2075 | std::optional<QJsonObject> workspace = {}; |
2076 | std::optional<QJsonValue> experimental = {}; |
2077 | |
2078 | template<typename W> |
2079 | void walk(W &w) |
2080 | { |
2081 | field(w, "textDocumentSync" , textDocumentSync); |
2082 | field(w, "completionProvider" , completionProvider); |
2083 | field(w, "hoverProvider" , hoverProvider); |
2084 | field(w, "signatureHelpProvider" , signatureHelpProvider); |
2085 | field(w, "declarationProvider" , declarationProvider); |
2086 | field(w, "definitionProvider" , definitionProvider); |
2087 | field(w, "typeDefinitionProvider" , typeDefinitionProvider); |
2088 | field(w, "implementationProvider" , implementationProvider); |
2089 | field(w, "referencesProvider" , referencesProvider); |
2090 | field(w, "documentHighlightProvider" , documentHighlightProvider); |
2091 | field(w, "documentSymbolProvider" , documentSymbolProvider); |
2092 | field(w, "codeActionProvider" , codeActionProvider); |
2093 | field(w, "codeLensProvider" , codeLensProvider); |
2094 | field(w, "documentLinkProvider" , documentLinkProvider); |
2095 | field(w, "colorProvider" , colorProvider); |
2096 | field(w, "documentFormattingProvider" , documentFormattingProvider); |
2097 | field(w, "documentRangeFormattingProvider" , documentRangeFormattingProvider); |
2098 | field(w, "documentOnTypeFormattingProvider" , documentOnTypeFormattingProvider); |
2099 | field(w, "renameProvider" , renameProvider); |
2100 | field(w, "foldingRangeProvider" , foldingRangeProvider); |
2101 | field(w, "executeCommandProvider" , executeCommandProvider); |
2102 | field(w, "selectionRangeProvider" , selectionRangeProvider); |
2103 | field(w, "linkedEditingRangeProvider" , linkedEditingRangeProvider); |
2104 | field(w, "callHierarchyProvider" , callHierarchyProvider); |
2105 | field(w, "semanticTokensProvider" , semanticTokensProvider); |
2106 | field(w, "monikerProvider" , monikerProvider); |
2107 | field(w, "workspaceSymbolProvider" , workspaceSymbolProvider); |
2108 | field(w, "workspace" , workspace); |
2109 | field(w, "experimental" , experimental); |
2110 | } |
2111 | }; |
2112 | |
2113 | class Q_LANGUAGESERVER_EXPORT InitializeResult |
2114 | { |
2115 | public: |
2116 | ServerCapabilities capabilities = {}; |
2117 | std::optional<QJsonObject> serverInfo = {}; |
2118 | |
2119 | template<typename W> |
2120 | void walk(W &w) |
2121 | { |
2122 | field(w, "capabilities" , capabilities); |
2123 | field(w, "serverInfo" , serverInfo); |
2124 | } |
2125 | }; |
2126 | |
2127 | class Q_LANGUAGESERVER_EXPORT InitializeError |
2128 | { |
2129 | public: |
2130 | bool retry = {}; |
2131 | |
2132 | template<typename W> |
2133 | void walk(W &w) |
2134 | { |
2135 | field(w, "retry" , retry); |
2136 | } |
2137 | }; |
2138 | |
2139 | class Q_LANGUAGESERVER_EXPORT InitializedParams |
2140 | { |
2141 | public: |
2142 | template<typename W> |
2143 | void walk(W &) |
2144 | { |
2145 | } |
2146 | }; |
2147 | |
2148 | class Q_LANGUAGESERVER_EXPORT LogTraceParams |
2149 | { |
2150 | public: |
2151 | QByteArray message = {}; |
2152 | std::optional<QByteArray> verbose = {}; |
2153 | |
2154 | template<typename W> |
2155 | void walk(W &w) |
2156 | { |
2157 | field(w, "message" , message); |
2158 | field(w, "verbose" , verbose); |
2159 | } |
2160 | }; |
2161 | |
2162 | class Q_LANGUAGESERVER_EXPORT SetTraceParams |
2163 | { |
2164 | public: |
2165 | TraceValue value = {}; |
2166 | |
2167 | template<typename W> |
2168 | void walk(W &w) |
2169 | { |
2170 | field(w, "value" , value); |
2171 | } |
2172 | }; |
2173 | |
2174 | class Q_LANGUAGESERVER_EXPORT ShowMessageParams |
2175 | { |
2176 | public: |
2177 | MessageType type = {}; |
2178 | QByteArray message = {}; |
2179 | |
2180 | template<typename W> |
2181 | void walk(W &w) |
2182 | { |
2183 | field(w, "type" , type); |
2184 | field(w, "message" , message); |
2185 | } |
2186 | }; |
2187 | |
2188 | class Q_LANGUAGESERVER_EXPORT MessageActionItem |
2189 | { |
2190 | public: |
2191 | QByteArray title = {}; |
2192 | |
2193 | template<typename W> |
2194 | void walk(W &w) |
2195 | { |
2196 | field(w, "title" , title); |
2197 | } |
2198 | }; |
2199 | |
2200 | class Q_LANGUAGESERVER_EXPORT ShowMessageRequestParams |
2201 | { |
2202 | public: |
2203 | MessageType type = {}; |
2204 | QByteArray message = {}; |
2205 | std::optional<QList<MessageActionItem>> actions = {}; |
2206 | |
2207 | template<typename W> |
2208 | void walk(W &w) |
2209 | { |
2210 | field(w, "type" , type); |
2211 | field(w, "message" , message); |
2212 | field(w, "actions" , actions); |
2213 | } |
2214 | }; |
2215 | |
2216 | class Q_LANGUAGESERVER_EXPORT ShowDocumentParams |
2217 | { |
2218 | public: |
2219 | QByteArray uri = {}; |
2220 | std::optional<bool> external = {}; |
2221 | std::optional<bool> takeFocus = {}; |
2222 | std::optional<Range> selection = {}; |
2223 | |
2224 | template<typename W> |
2225 | void walk(W &w) |
2226 | { |
2227 | field(w, "uri" , uri); |
2228 | field(w, "external" , external); |
2229 | field(w, "takeFocus" , takeFocus); |
2230 | field(w, "selection" , selection); |
2231 | } |
2232 | }; |
2233 | |
2234 | class Q_LANGUAGESERVER_EXPORT ShowDocumentResult |
2235 | { |
2236 | public: |
2237 | bool success = {}; |
2238 | |
2239 | template<typename W> |
2240 | void walk(W &w) |
2241 | { |
2242 | field(w, "success" , success); |
2243 | } |
2244 | }; |
2245 | |
2246 | class Q_LANGUAGESERVER_EXPORT LogMessageParams |
2247 | { |
2248 | public: |
2249 | MessageType type = {}; |
2250 | QByteArray message = {}; |
2251 | |
2252 | template<typename W> |
2253 | void walk(W &w) |
2254 | { |
2255 | field(w, "type" , type); |
2256 | field(w, "message" , message); |
2257 | } |
2258 | }; |
2259 | |
2260 | class Q_LANGUAGESERVER_EXPORT WorkDoneProgressCreateParams |
2261 | { |
2262 | public: |
2263 | ProgressToken token = {}; |
2264 | |
2265 | template<typename W> |
2266 | void walk(W &w) |
2267 | { |
2268 | field(w, "token" , token); |
2269 | } |
2270 | }; |
2271 | |
2272 | class Q_LANGUAGESERVER_EXPORT WorkDoneProgressCancelParams |
2273 | { |
2274 | public: |
2275 | ProgressToken token = {}; |
2276 | |
2277 | template<typename W> |
2278 | void walk(W &w) |
2279 | { |
2280 | field(w, "token" , token); |
2281 | } |
2282 | }; |
2283 | |
2284 | class Q_LANGUAGESERVER_EXPORT Registration |
2285 | { |
2286 | public: |
2287 | QByteArray id = {}; |
2288 | QByteArray method = {}; |
2289 | std::optional<QJsonValue> registerOptions = {}; |
2290 | |
2291 | template<typename W> |
2292 | void walk(W &w) |
2293 | { |
2294 | field(w, "id" , id); |
2295 | field(w, "method" , method); |
2296 | field(w, "registerOptions" , registerOptions); |
2297 | } |
2298 | }; |
2299 | |
2300 | class Q_LANGUAGESERVER_EXPORT RegistrationParams |
2301 | { |
2302 | public: |
2303 | QList<Registration> registrations = {}; |
2304 | |
2305 | template<typename W> |
2306 | void walk(W &w) |
2307 | { |
2308 | field(w, "registrations" , registrations); |
2309 | } |
2310 | }; |
2311 | |
2312 | class Q_LANGUAGESERVER_EXPORT Unregistration |
2313 | { |
2314 | public: |
2315 | QByteArray id = {}; |
2316 | QByteArray method = {}; |
2317 | |
2318 | template<typename W> |
2319 | void walk(W &w) |
2320 | { |
2321 | field(w, "id" , id); |
2322 | field(w, "method" , method); |
2323 | } |
2324 | }; |
2325 | |
2326 | class Q_LANGUAGESERVER_EXPORT UnregistrationParams |
2327 | { |
2328 | public: |
2329 | QList<Unregistration> unregisterations = {}; |
2330 | |
2331 | template<typename W> |
2332 | void walk(W &w) |
2333 | { |
2334 | field(w, "unregisterations" , unregisterations); |
2335 | } |
2336 | }; |
2337 | |
2338 | class Q_LANGUAGESERVER_EXPORT WorkspaceFoldersChangeEvent |
2339 | { |
2340 | public: |
2341 | QList<WorkspaceFolder> added = {}; |
2342 | QList<WorkspaceFolder> removed = {}; |
2343 | |
2344 | template<typename W> |
2345 | void walk(W &w) |
2346 | { |
2347 | field(w, "added" , added); |
2348 | field(w, "removed" , removed); |
2349 | } |
2350 | }; |
2351 | |
2352 | class Q_LANGUAGESERVER_EXPORT DidChangeWorkspaceFoldersParams |
2353 | { |
2354 | public: |
2355 | WorkspaceFoldersChangeEvent event = {}; |
2356 | |
2357 | template<typename W> |
2358 | void walk(W &w) |
2359 | { |
2360 | field(w, "event" , event); |
2361 | } |
2362 | }; |
2363 | |
2364 | class Q_LANGUAGESERVER_EXPORT DidChangeConfigurationParams |
2365 | { |
2366 | public: |
2367 | QJsonValue settings = {}; |
2368 | |
2369 | template<typename W> |
2370 | void walk(W &w) |
2371 | { |
2372 | field(w, "settings" , settings); |
2373 | } |
2374 | }; |
2375 | |
2376 | class Q_LANGUAGESERVER_EXPORT ConfigurationItem |
2377 | { |
2378 | public: |
2379 | std::optional<QByteArray> scopeUri = {}; |
2380 | std::optional<QByteArray> section = {}; |
2381 | |
2382 | template<typename W> |
2383 | void walk(W &w) |
2384 | { |
2385 | field(w, "scopeUri" , scopeUri); |
2386 | field(w, "section" , section); |
2387 | } |
2388 | }; |
2389 | |
2390 | class Q_LANGUAGESERVER_EXPORT ConfigurationParams |
2391 | { |
2392 | public: |
2393 | QList<ConfigurationItem> items = {}; |
2394 | |
2395 | template<typename W> |
2396 | void walk(W &w) |
2397 | { |
2398 | field(w, "items" , items); |
2399 | } |
2400 | }; |
2401 | |
2402 | class Q_LANGUAGESERVER_EXPORT DidChangeWatchedFilesClientCapabilities |
2403 | { |
2404 | public: |
2405 | std::optional<bool> dynamicRegistration = {}; |
2406 | |
2407 | template<typename W> |
2408 | void walk(W &w) |
2409 | { |
2410 | field(w, "dynamicRegistration" , dynamicRegistration); |
2411 | } |
2412 | }; |
2413 | |
2414 | class Q_LANGUAGESERVER_EXPORT FileSystemWatcher |
2415 | { |
2416 | public: |
2417 | QByteArray globPattern = {}; |
2418 | std::optional<int> kind = {}; |
2419 | |
2420 | template<typename W> |
2421 | void walk(W &w) |
2422 | { |
2423 | field(w, "globPattern" , globPattern); |
2424 | field(w, "kind" , kind); |
2425 | } |
2426 | }; |
2427 | |
2428 | class Q_LANGUAGESERVER_EXPORT DidChangeWatchedFilesRegistrationOptions |
2429 | { |
2430 | public: |
2431 | QList<FileSystemWatcher> watchers = {}; |
2432 | |
2433 | template<typename W> |
2434 | void walk(W &w) |
2435 | { |
2436 | field(w, "watchers" , watchers); |
2437 | } |
2438 | }; |
2439 | |
2440 | class Q_LANGUAGESERVER_EXPORT FileEvent |
2441 | { |
2442 | public: |
2443 | QByteArray uri = {}; |
2444 | int type = {}; |
2445 | |
2446 | template<typename W> |
2447 | void walk(W &w) |
2448 | { |
2449 | field(w, "uri" , uri); |
2450 | field(w, "type" , type); |
2451 | } |
2452 | }; |
2453 | |
2454 | class Q_LANGUAGESERVER_EXPORT DidChangeWatchedFilesParams |
2455 | { |
2456 | public: |
2457 | QList<FileEvent> changes = {}; |
2458 | |
2459 | template<typename W> |
2460 | void walk(W &w) |
2461 | { |
2462 | field(w, "changes" , changes); |
2463 | } |
2464 | }; |
2465 | |
2466 | class Q_LANGUAGESERVER_EXPORT WorkspaceSymbolClientCapabilities |
2467 | { |
2468 | public: |
2469 | std::optional<bool> dynamicRegistration = {}; |
2470 | std::optional<QJsonObject> symbolKind = {}; |
2471 | std::optional<QJsonObject> tagSupport = {}; |
2472 | |
2473 | template<typename W> |
2474 | void walk(W &w) |
2475 | { |
2476 | field(w, "dynamicRegistration" , dynamicRegistration); |
2477 | field(w, "symbolKind" , symbolKind); |
2478 | field(w, "tagSupport" , tagSupport); |
2479 | } |
2480 | }; |
2481 | |
2482 | class Q_LANGUAGESERVER_EXPORT WorkspaceSymbolRegistrationOptions : public WorkspaceSymbolOptions |
2483 | { |
2484 | public: |
2485 | template<typename W> |
2486 | void walk(W &w) |
2487 | { |
2488 | WorkspaceSymbolOptions::walk(w); |
2489 | } |
2490 | }; |
2491 | |
2492 | class Q_LANGUAGESERVER_EXPORT WorkspaceSymbolParams : public WorkDoneProgressParams, |
2493 | PartialResultParams |
2494 | { |
2495 | public: |
2496 | QByteArray query = {}; |
2497 | |
2498 | template<typename W> |
2499 | void walk(W &w) |
2500 | { |
2501 | WorkDoneProgressParams::walk(w); |
2502 | PartialResultParams::walk(w); |
2503 | field(w, "query" , query); |
2504 | } |
2505 | }; |
2506 | |
2507 | class Q_LANGUAGESERVER_EXPORT ExecuteCommandClientCapabilities |
2508 | { |
2509 | public: |
2510 | std::optional<bool> dynamicRegistration = {}; |
2511 | |
2512 | template<typename W> |
2513 | void walk(W &w) |
2514 | { |
2515 | field(w, "dynamicRegistration" , dynamicRegistration); |
2516 | } |
2517 | }; |
2518 | |
2519 | class Q_LANGUAGESERVER_EXPORT ExecuteCommandRegistrationOptions : public ExecuteCommandOptions |
2520 | { |
2521 | public: |
2522 | template<typename W> |
2523 | void walk(W &w) |
2524 | { |
2525 | ExecuteCommandOptions::walk(w); |
2526 | } |
2527 | }; |
2528 | |
2529 | class Q_LANGUAGESERVER_EXPORT ExecuteCommandParams : public WorkDoneProgressParams |
2530 | { |
2531 | public: |
2532 | QByteArray command = {}; |
2533 | std::optional<QList<QJsonValue>> arguments = {}; |
2534 | |
2535 | template<typename W> |
2536 | void walk(W &w) |
2537 | { |
2538 | WorkDoneProgressParams::walk(w); |
2539 | field(w, "command" , command); |
2540 | field(w, "arguments" , arguments); |
2541 | } |
2542 | }; |
2543 | |
2544 | class Q_LANGUAGESERVER_EXPORT ApplyWorkspaceEditParams |
2545 | { |
2546 | public: |
2547 | std::optional<QByteArray> label = {}; |
2548 | WorkspaceEdit edit = {}; |
2549 | |
2550 | template<typename W> |
2551 | void walk(W &w) |
2552 | { |
2553 | field(w, "label" , label); |
2554 | field(w, "edit" , edit); |
2555 | } |
2556 | }; |
2557 | |
2558 | class Q_LANGUAGESERVER_EXPORT ApplyWorkspaceEditResponse |
2559 | { |
2560 | public: |
2561 | bool applied = {}; |
2562 | std::optional<QByteArray> failureReason = {}; |
2563 | std::optional<int> failedChange = {}; |
2564 | |
2565 | template<typename W> |
2566 | void walk(W &w) |
2567 | { |
2568 | field(w, "applied" , applied); |
2569 | field(w, "failureReason" , failureReason); |
2570 | field(w, "failedChange" , failedChange); |
2571 | } |
2572 | }; |
2573 | |
2574 | class Q_LANGUAGESERVER_EXPORT FileCreate |
2575 | { |
2576 | public: |
2577 | QByteArray uri = {}; |
2578 | |
2579 | template<typename W> |
2580 | void walk(W &w) |
2581 | { |
2582 | field(w, "uri" , uri); |
2583 | } |
2584 | }; |
2585 | |
2586 | class Q_LANGUAGESERVER_EXPORT CreateFilesParams |
2587 | { |
2588 | public: |
2589 | QList<FileCreate> files = {}; |
2590 | |
2591 | template<typename W> |
2592 | void walk(W &w) |
2593 | { |
2594 | field(w, "files" , files); |
2595 | } |
2596 | }; |
2597 | |
2598 | class Q_LANGUAGESERVER_EXPORT FileRename |
2599 | { |
2600 | public: |
2601 | QByteArray oldUri = {}; |
2602 | QByteArray newUri = {}; |
2603 | |
2604 | template<typename W> |
2605 | void walk(W &w) |
2606 | { |
2607 | field(w, "oldUri" , oldUri); |
2608 | field(w, "newUri" , newUri); |
2609 | } |
2610 | }; |
2611 | |
2612 | class Q_LANGUAGESERVER_EXPORT RenameFilesParams |
2613 | { |
2614 | public: |
2615 | QList<FileRename> files = {}; |
2616 | |
2617 | template<typename W> |
2618 | void walk(W &w) |
2619 | { |
2620 | field(w, "files" , files); |
2621 | } |
2622 | }; |
2623 | |
2624 | class Q_LANGUAGESERVER_EXPORT FileDelete |
2625 | { |
2626 | public: |
2627 | QByteArray uri = {}; |
2628 | |
2629 | template<typename W> |
2630 | void walk(W &w) |
2631 | { |
2632 | field(w, "uri" , uri); |
2633 | } |
2634 | }; |
2635 | |
2636 | class Q_LANGUAGESERVER_EXPORT DeleteFilesParams |
2637 | { |
2638 | public: |
2639 | QList<FileDelete> files = {}; |
2640 | |
2641 | template<typename W> |
2642 | void walk(W &w) |
2643 | { |
2644 | field(w, "files" , files); |
2645 | } |
2646 | }; |
2647 | |
2648 | class Q_LANGUAGESERVER_EXPORT DidOpenTextDocumentParams |
2649 | { |
2650 | public: |
2651 | TextDocumentItem textDocument = {}; |
2652 | |
2653 | template<typename W> |
2654 | void walk(W &w) |
2655 | { |
2656 | field(w, "textDocument" , textDocument); |
2657 | } |
2658 | }; |
2659 | |
2660 | class Q_LANGUAGESERVER_EXPORT TextDocumentChangeRegistrationOptions |
2661 | : public TextDocumentRegistrationOptions |
2662 | { |
2663 | public: |
2664 | TextDocumentSyncKind syncKind = {}; |
2665 | |
2666 | template<typename W> |
2667 | void walk(W &w) |
2668 | { |
2669 | TextDocumentRegistrationOptions::walk(w); |
2670 | field(w, "syncKind" , syncKind); |
2671 | } |
2672 | }; |
2673 | |
2674 | class Q_LANGUAGESERVER_EXPORT DidChangeTextDocumentParams |
2675 | { |
2676 | public: |
2677 | VersionedTextDocumentIdentifier textDocument = {}; |
2678 | QList<TextDocumentContentChangeEvent> contentChanges = {}; |
2679 | |
2680 | template<typename W> |
2681 | void walk(W &w) |
2682 | { |
2683 | field(w, "textDocument" , textDocument); |
2684 | field(w, "contentChanges" , contentChanges); |
2685 | } |
2686 | }; |
2687 | |
2688 | class Q_LANGUAGESERVER_EXPORT WillSaveTextDocumentParams |
2689 | { |
2690 | public: |
2691 | TextDocumentIdentifier textDocument = {}; |
2692 | TextDocumentSaveReason reason = {}; |
2693 | |
2694 | template<typename W> |
2695 | void walk(W &w) |
2696 | { |
2697 | field(w, "textDocument" , textDocument); |
2698 | field(w, "reason" , reason); |
2699 | } |
2700 | }; |
2701 | |
2702 | class Q_LANGUAGESERVER_EXPORT SaveOptions |
2703 | { |
2704 | public: |
2705 | std::optional<bool> includeText = {}; |
2706 | |
2707 | template<typename W> |
2708 | void walk(W &w) |
2709 | { |
2710 | field(w, "includeText" , includeText); |
2711 | } |
2712 | }; |
2713 | |
2714 | class Q_LANGUAGESERVER_EXPORT TextDocumentSaveRegistrationOptions |
2715 | : public TextDocumentRegistrationOptions |
2716 | { |
2717 | public: |
2718 | std::optional<bool> includeText = {}; |
2719 | |
2720 | template<typename W> |
2721 | void walk(W &w) |
2722 | { |
2723 | TextDocumentRegistrationOptions::walk(w); |
2724 | field(w, "includeText" , includeText); |
2725 | } |
2726 | }; |
2727 | |
2728 | class Q_LANGUAGESERVER_EXPORT DidSaveTextDocumentParams |
2729 | { |
2730 | public: |
2731 | TextDocumentIdentifier textDocument = {}; |
2732 | std::optional<QByteArray> text = {}; |
2733 | |
2734 | template<typename W> |
2735 | void walk(W &w) |
2736 | { |
2737 | field(w, "textDocument" , textDocument); |
2738 | field(w, "text" , text); |
2739 | } |
2740 | }; |
2741 | |
2742 | class Q_LANGUAGESERVER_EXPORT DidCloseTextDocumentParams |
2743 | { |
2744 | public: |
2745 | TextDocumentIdentifier textDocument = {}; |
2746 | |
2747 | template<typename W> |
2748 | void walk(W &w) |
2749 | { |
2750 | field(w, "textDocument" , textDocument); |
2751 | } |
2752 | }; |
2753 | |
2754 | class Q_LANGUAGESERVER_EXPORT PublishDiagnosticsParams |
2755 | { |
2756 | public: |
2757 | QByteArray uri = {}; |
2758 | std::optional<int> version = {}; |
2759 | QList<Diagnostic> diagnostics = {}; |
2760 | |
2761 | template<typename W> |
2762 | void walk(W &w) |
2763 | { |
2764 | field(w, "uri" , uri); |
2765 | field(w, "version" , version); |
2766 | field(w, "diagnostics" , diagnostics); |
2767 | } |
2768 | }; |
2769 | |
2770 | class Q_LANGUAGESERVER_EXPORT CompletionRegistrationOptions |
2771 | : public TextDocumentRegistrationOptions, |
2772 | CompletionOptions |
2773 | { |
2774 | public: |
2775 | template<typename W> |
2776 | void walk(W &w) |
2777 | { |
2778 | TextDocumentRegistrationOptions::walk(w); |
2779 | CompletionOptions::walk(w); |
2780 | } |
2781 | }; |
2782 | |
2783 | class Q_LANGUAGESERVER_EXPORT CompletionContext |
2784 | { |
2785 | public: |
2786 | CompletionTriggerKind triggerKind = {}; |
2787 | std::optional<QByteArray> triggerCharacter = {}; |
2788 | |
2789 | template<typename W> |
2790 | void walk(W &w) |
2791 | { |
2792 | field(w, "triggerKind" , triggerKind); |
2793 | field(w, "triggerCharacter" , triggerCharacter); |
2794 | } |
2795 | }; |
2796 | |
2797 | class Q_LANGUAGESERVER_EXPORT CompletionParams : public TextDocumentPositionParams, |
2798 | WorkDoneProgressParams, |
2799 | PartialResultParams |
2800 | { |
2801 | public: |
2802 | std::optional<CompletionContext> context = {}; |
2803 | |
2804 | template<typename W> |
2805 | void walk(W &w) |
2806 | { |
2807 | TextDocumentPositionParams::walk(w); |
2808 | WorkDoneProgressParams::walk(w); |
2809 | PartialResultParams::walk(w); |
2810 | field(w, "context" , context); |
2811 | } |
2812 | }; |
2813 | |
2814 | class Q_LANGUAGESERVER_EXPORT InsertReplaceEdit |
2815 | { |
2816 | public: |
2817 | QByteArray newText = {}; |
2818 | Range insert = {}; |
2819 | Range replace = {}; |
2820 | |
2821 | template<typename W> |
2822 | void walk(W &w) |
2823 | { |
2824 | field(w, "newText" , newText); |
2825 | field(w, "insert" , insert); |
2826 | field(w, "replace" , replace); |
2827 | } |
2828 | }; |
2829 | |
2830 | class Q_LANGUAGESERVER_EXPORT CompletionItem |
2831 | { |
2832 | public: |
2833 | QByteArray label = {}; |
2834 | std::optional<QJsonValue> kind = {}; |
2835 | std::optional<QList<int>> tags = {}; |
2836 | std::optional<QByteArray> detail = {}; |
2837 | std::optional<std::variant<QByteArray, MarkupContent>> documentation = {}; |
2838 | std::optional<bool> deprecated = {}; |
2839 | std::optional<bool> preselect = {}; |
2840 | std::optional<QByteArray> sortText = {}; |
2841 | std::optional<QByteArray> filterText = {}; |
2842 | std::optional<QByteArray> insertText = {}; |
2843 | std::optional<InsertTextFormat> insertTextFormat = {}; |
2844 | std::optional<InsertTextMode> insertTextMode = {}; |
2845 | std::optional<std::variant<TextEdit, InsertReplaceEdit>> textEdit = {}; |
2846 | std::optional<QList<TextEdit>> additionalTextEdits = {}; |
2847 | std::optional<QList<QByteArray>> commitCharacters = {}; |
2848 | std::optional<Command> command = {}; |
2849 | std::optional<QJsonValue> data = {}; |
2850 | |
2851 | template<typename W> |
2852 | void walk(W &w) |
2853 | { |
2854 | field(w, "label" , label); |
2855 | field(w, "kind" , kind); |
2856 | field(w, "tags" , tags); |
2857 | field(w, "detail" , detail); |
2858 | field(w, "documentation" , documentation); |
2859 | field(w, "deprecated" , deprecated); |
2860 | field(w, "preselect" , preselect); |
2861 | field(w, "sortText" , sortText); |
2862 | field(w, "filterText" , filterText); |
2863 | field(w, "insertText" , insertText); |
2864 | field(w, "insertTextFormat" , insertTextFormat); |
2865 | field(w, "insertTextMode" , insertTextMode); |
2866 | field(w, "textEdit" , textEdit); |
2867 | field(w, "additionalTextEdits" , additionalTextEdits); |
2868 | field(w, "commitCharacters" , commitCharacters); |
2869 | field(w, "command" , command); |
2870 | field(w, "data" , data); |
2871 | } |
2872 | }; |
2873 | |
2874 | class Q_LANGUAGESERVER_EXPORT CompletionList |
2875 | { |
2876 | public: |
2877 | bool isIncomplete = {}; |
2878 | QList<CompletionItem> items = {}; |
2879 | |
2880 | template<typename W> |
2881 | void walk(W &w) |
2882 | { |
2883 | field(w, "isIncomplete" , isIncomplete); |
2884 | field(w, "items" , items); |
2885 | } |
2886 | }; |
2887 | |
2888 | class Q_LANGUAGESERVER_EXPORT HoverRegistrationOptions : public TextDocumentRegistrationOptions, |
2889 | HoverOptions |
2890 | { |
2891 | public: |
2892 | template<typename W> |
2893 | void walk(W &w) |
2894 | { |
2895 | TextDocumentRegistrationOptions::walk(w); |
2896 | HoverOptions::walk(w); |
2897 | } |
2898 | }; |
2899 | |
2900 | class Q_LANGUAGESERVER_EXPORT HoverParams : public TextDocumentPositionParams, |
2901 | WorkDoneProgressParams |
2902 | { |
2903 | public: |
2904 | template<typename W> |
2905 | void walk(W &w) |
2906 | { |
2907 | TextDocumentPositionParams::walk(w); |
2908 | WorkDoneProgressParams::walk(w); |
2909 | } |
2910 | }; |
2911 | |
2912 | class Q_LANGUAGESERVER_EXPORT Hover |
2913 | { |
2914 | public: |
2915 | std::variant<MarkupContent, MarkedString, QList<MarkedString>> contents = {}; |
2916 | std::optional<Range> range = {}; |
2917 | |
2918 | template<typename W> |
2919 | void walk(W &w) |
2920 | { |
2921 | field(w, "contents" , contents); |
2922 | field(w, "range" , range); |
2923 | } |
2924 | }; |
2925 | |
2926 | class Q_LANGUAGESERVER_EXPORT SignatureHelpRegistrationOptions |
2927 | : public TextDocumentRegistrationOptions, |
2928 | SignatureHelpOptions |
2929 | { |
2930 | public: |
2931 | template<typename W> |
2932 | void walk(W &w) |
2933 | { |
2934 | TextDocumentRegistrationOptions::walk(w); |
2935 | SignatureHelpOptions::walk(w); |
2936 | } |
2937 | }; |
2938 | |
2939 | class Q_LANGUAGESERVER_EXPORT ParameterInformation |
2940 | { |
2941 | public: |
2942 | std::variant<QByteArray, std::pair<int, int>> label = {}; |
2943 | std::optional<std::variant<QByteArray, MarkupContent>> documentation = {}; |
2944 | |
2945 | template<typename W> |
2946 | void walk(W &w) |
2947 | { |
2948 | field(w, "label" , label); |
2949 | field(w, "documentation" , documentation); |
2950 | } |
2951 | }; |
2952 | |
2953 | class Q_LANGUAGESERVER_EXPORT SignatureInformation |
2954 | { |
2955 | public: |
2956 | QByteArray label = {}; |
2957 | std::optional<std::variant<QByteArray, MarkupContent>> documentation = {}; |
2958 | std::optional<QList<ParameterInformation>> parameters = {}; |
2959 | std::optional<int> activeParameter = {}; |
2960 | |
2961 | template<typename W> |
2962 | void walk(W &w) |
2963 | { |
2964 | field(w, "label" , label); |
2965 | field(w, "documentation" , documentation); |
2966 | field(w, "parameters" , parameters); |
2967 | field(w, "activeParameter" , activeParameter); |
2968 | } |
2969 | }; |
2970 | |
2971 | class Q_LANGUAGESERVER_EXPORT SignatureHelp |
2972 | { |
2973 | public: |
2974 | QList<SignatureInformation> signatures = {}; |
2975 | std::optional<int> activeSignature = {}; |
2976 | std::optional<int> activeParameter = {}; |
2977 | |
2978 | template<typename W> |
2979 | void walk(W &w) |
2980 | { |
2981 | field(w, "signatures" , signatures); |
2982 | field(w, "activeSignature" , activeSignature); |
2983 | field(w, "activeParameter" , activeParameter); |
2984 | } |
2985 | }; |
2986 | |
2987 | class Q_LANGUAGESERVER_EXPORT SignatureHelpContext |
2988 | { |
2989 | public: |
2990 | SignatureHelpTriggerKind triggerKind = {}; |
2991 | std::optional<QByteArray> triggerCharacter = {}; |
2992 | bool isRetrigger = {}; |
2993 | std::optional<SignatureHelp> activeSignatureHelp = {}; |
2994 | |
2995 | template<typename W> |
2996 | void walk(W &w) |
2997 | { |
2998 | field(w, "triggerKind" , triggerKind); |
2999 | field(w, "triggerCharacter" , triggerCharacter); |
3000 | field(w, "isRetrigger" , isRetrigger); |
3001 | field(w, "activeSignatureHelp" , activeSignatureHelp); |
3002 | } |
3003 | }; |
3004 | |
3005 | class Q_LANGUAGESERVER_EXPORT SignatureHelpParams : public TextDocumentPositionParams, |
3006 | WorkDoneProgressParams |
3007 | { |
3008 | public: |
3009 | std::optional<SignatureHelpContext> context = {}; |
3010 | |
3011 | template<typename W> |
3012 | void walk(W &w) |
3013 | { |
3014 | TextDocumentPositionParams::walk(w); |
3015 | WorkDoneProgressParams::walk(w); |
3016 | field(w, "context" , context); |
3017 | } |
3018 | }; |
3019 | |
3020 | class Q_LANGUAGESERVER_EXPORT DeclarationParams : public TextDocumentPositionParams, |
3021 | WorkDoneProgressParams, |
3022 | PartialResultParams |
3023 | { |
3024 | public: |
3025 | template<typename W> |
3026 | void walk(W &w) |
3027 | { |
3028 | TextDocumentPositionParams::walk(w); |
3029 | WorkDoneProgressParams::walk(w); |
3030 | PartialResultParams::walk(w); |
3031 | } |
3032 | }; |
3033 | |
3034 | class Q_LANGUAGESERVER_EXPORT DefinitionRegistrationOptions |
3035 | : public TextDocumentRegistrationOptions, |
3036 | DefinitionOptions |
3037 | { |
3038 | public: |
3039 | template<typename W> |
3040 | void walk(W &w) |
3041 | { |
3042 | TextDocumentRegistrationOptions::walk(w); |
3043 | DefinitionOptions::walk(w); |
3044 | } |
3045 | }; |
3046 | |
3047 | class Q_LANGUAGESERVER_EXPORT DefinitionParams : public TextDocumentPositionParams, |
3048 | WorkDoneProgressParams, |
3049 | PartialResultParams |
3050 | { |
3051 | public: |
3052 | template<typename W> |
3053 | void walk(W &w) |
3054 | { |
3055 | TextDocumentPositionParams::walk(w); |
3056 | WorkDoneProgressParams::walk(w); |
3057 | PartialResultParams::walk(w); |
3058 | } |
3059 | }; |
3060 | |
3061 | class Q_LANGUAGESERVER_EXPORT TypeDefinitionParams : public TextDocumentPositionParams, |
3062 | WorkDoneProgressParams, |
3063 | PartialResultParams |
3064 | { |
3065 | public: |
3066 | template<typename W> |
3067 | void walk(W &w) |
3068 | { |
3069 | TextDocumentPositionParams::walk(w); |
3070 | WorkDoneProgressParams::walk(w); |
3071 | PartialResultParams::walk(w); |
3072 | } |
3073 | }; |
3074 | |
3075 | class Q_LANGUAGESERVER_EXPORT ImplementationParams : public TextDocumentPositionParams, |
3076 | WorkDoneProgressParams, |
3077 | PartialResultParams |
3078 | { |
3079 | public: |
3080 | template<typename W> |
3081 | void walk(W &w) |
3082 | { |
3083 | TextDocumentPositionParams::walk(w); |
3084 | WorkDoneProgressParams::walk(w); |
3085 | PartialResultParams::walk(w); |
3086 | } |
3087 | }; |
3088 | |
3089 | class Q_LANGUAGESERVER_EXPORT ReferenceRegistrationOptions : public TextDocumentRegistrationOptions, |
3090 | ReferenceOptions |
3091 | { |
3092 | public: |
3093 | template<typename W> |
3094 | void walk(W &w) |
3095 | { |
3096 | TextDocumentRegistrationOptions::walk(w); |
3097 | ReferenceOptions::walk(w); |
3098 | } |
3099 | }; |
3100 | |
3101 | class Q_LANGUAGESERVER_EXPORT ReferenceContext |
3102 | { |
3103 | public: |
3104 | bool includeDeclaration = {}; |
3105 | |
3106 | template<typename W> |
3107 | void walk(W &w) |
3108 | { |
3109 | field(w, "includeDeclaration" , includeDeclaration); |
3110 | } |
3111 | }; |
3112 | |
3113 | class Q_LANGUAGESERVER_EXPORT ReferenceParams : public TextDocumentPositionParams, |
3114 | WorkDoneProgressParams, |
3115 | PartialResultParams |
3116 | { |
3117 | public: |
3118 | ReferenceContext context = {}; |
3119 | |
3120 | template<typename W> |
3121 | void walk(W &w) |
3122 | { |
3123 | TextDocumentPositionParams::walk(w); |
3124 | WorkDoneProgressParams::walk(w); |
3125 | PartialResultParams::walk(w); |
3126 | field(w, "context" , context); |
3127 | } |
3128 | }; |
3129 | |
3130 | class Q_LANGUAGESERVER_EXPORT DocumentHighlightRegistrationOptions |
3131 | : public TextDocumentRegistrationOptions, |
3132 | DocumentHighlightOptions |
3133 | { |
3134 | public: |
3135 | template<typename W> |
3136 | void walk(W &w) |
3137 | { |
3138 | TextDocumentRegistrationOptions::walk(w); |
3139 | DocumentHighlightOptions::walk(w); |
3140 | } |
3141 | }; |
3142 | |
3143 | class Q_LANGUAGESERVER_EXPORT DocumentHighlightParams : public TextDocumentPositionParams, |
3144 | WorkDoneProgressParams, |
3145 | PartialResultParams |
3146 | { |
3147 | public: |
3148 | template<typename W> |
3149 | void walk(W &w) |
3150 | { |
3151 | TextDocumentPositionParams::walk(w); |
3152 | WorkDoneProgressParams::walk(w); |
3153 | PartialResultParams::walk(w); |
3154 | } |
3155 | }; |
3156 | |
3157 | class Q_LANGUAGESERVER_EXPORT DocumentHighlight |
3158 | { |
3159 | public: |
3160 | Range range = {}; |
3161 | std::optional<DocumentHighlightKind> kind = {}; |
3162 | |
3163 | template<typename W> |
3164 | void walk(W &w) |
3165 | { |
3166 | field(w, "range" , range); |
3167 | field(w, "kind" , kind); |
3168 | } |
3169 | }; |
3170 | |
3171 | class Q_LANGUAGESERVER_EXPORT DocumentSymbolRegistrationOptions |
3172 | : public TextDocumentRegistrationOptions, |
3173 | DocumentSymbolOptions |
3174 | { |
3175 | public: |
3176 | template<typename W> |
3177 | void walk(W &w) |
3178 | { |
3179 | TextDocumentRegistrationOptions::walk(w); |
3180 | DocumentSymbolOptions::walk(w); |
3181 | } |
3182 | }; |
3183 | |
3184 | class Q_LANGUAGESERVER_EXPORT DocumentSymbolParams : public WorkDoneProgressParams, |
3185 | PartialResultParams |
3186 | { |
3187 | public: |
3188 | TextDocumentIdentifier textDocument = {}; |
3189 | |
3190 | template<typename W> |
3191 | void walk(W &w) |
3192 | { |
3193 | WorkDoneProgressParams::walk(w); |
3194 | PartialResultParams::walk(w); |
3195 | field(w, "textDocument" , textDocument); |
3196 | } |
3197 | }; |
3198 | |
3199 | class Q_LANGUAGESERVER_EXPORT DocumentSymbol |
3200 | { |
3201 | public: |
3202 | QByteArray name = {}; |
3203 | std::optional<QByteArray> detail = {}; |
3204 | QJsonValue kind = {}; |
3205 | std::optional<QList<int>> tags = {}; |
3206 | std::optional<bool> deprecated = {}; |
3207 | Range range = {}; |
3208 | Range selectionRange = {}; |
3209 | std::optional<QList<DocumentSymbol>> children = {}; |
3210 | |
3211 | template<typename W> |
3212 | void walk(W &w) |
3213 | { |
3214 | field(w, "name" , name); |
3215 | field(w, "detail" , detail); |
3216 | field(w, "kind" , kind); |
3217 | field(w, "tags" , tags); |
3218 | field(w, "deprecated" , deprecated); |
3219 | field(w, "range" , range); |
3220 | field(w, "selectionRange" , selectionRange); |
3221 | field(w, "children" , children); |
3222 | } |
3223 | }; |
3224 | |
3225 | class Q_LANGUAGESERVER_EXPORT SymbolInformation |
3226 | { |
3227 | public: |
3228 | QByteArray name = {}; |
3229 | QJsonValue kind = {}; |
3230 | std::optional<QList<int>> tags = {}; |
3231 | std::optional<bool> deprecated = {}; |
3232 | Location location = {}; |
3233 | std::optional<QByteArray> containerName = {}; |
3234 | |
3235 | template<typename W> |
3236 | void walk(W &w) |
3237 | { |
3238 | field(w, "name" , name); |
3239 | field(w, "kind" , kind); |
3240 | field(w, "tags" , tags); |
3241 | field(w, "deprecated" , deprecated); |
3242 | field(w, "location" , location); |
3243 | field(w, "containerName" , containerName); |
3244 | } |
3245 | }; |
3246 | |
3247 | class Q_LANGUAGESERVER_EXPORT CodeActionRegistrationOptions |
3248 | : public TextDocumentRegistrationOptions, |
3249 | CodeActionOptions |
3250 | { |
3251 | public: |
3252 | template<typename W> |
3253 | void walk(W &w) |
3254 | { |
3255 | TextDocumentRegistrationOptions::walk(w); |
3256 | CodeActionOptions::walk(w); |
3257 | } |
3258 | }; |
3259 | |
3260 | class Q_LANGUAGESERVER_EXPORT CodeActionContext |
3261 | { |
3262 | public: |
3263 | QList<Diagnostic> diagnostics = {}; |
3264 | std::optional<QList<QByteArray>> only = {}; |
3265 | |
3266 | template<typename W> |
3267 | void walk(W &w) |
3268 | { |
3269 | field(w, "diagnostics" , diagnostics); |
3270 | field(w, "only" , only); |
3271 | } |
3272 | }; |
3273 | |
3274 | class Q_LANGUAGESERVER_EXPORT CodeActionParams : public WorkDoneProgressParams, PartialResultParams |
3275 | { |
3276 | public: |
3277 | TextDocumentIdentifier textDocument = {}; |
3278 | Range range = {}; |
3279 | CodeActionContext context = {}; |
3280 | |
3281 | template<typename W> |
3282 | void walk(W &w) |
3283 | { |
3284 | WorkDoneProgressParams::walk(w); |
3285 | PartialResultParams::walk(w); |
3286 | field(w, "textDocument" , textDocument); |
3287 | field(w, "range" , range); |
3288 | field(w, "context" , context); |
3289 | } |
3290 | }; |
3291 | |
3292 | class Q_LANGUAGESERVER_EXPORT CodeAction |
3293 | { |
3294 | public: |
3295 | QByteArray title = {}; |
3296 | std::optional<QByteArray> kind = {}; |
3297 | std::optional<QList<Diagnostic>> diagnostics = {}; |
3298 | std::optional<bool> isPreferred = {}; |
3299 | std::optional<QJsonObject> disabled = {}; |
3300 | std::optional<WorkspaceEdit> edit = {}; |
3301 | std::optional<Command> command = {}; |
3302 | std::optional<QJsonValue> data = {}; |
3303 | |
3304 | template<typename W> |
3305 | void walk(W &w) |
3306 | { |
3307 | field(w, "title" , title); |
3308 | field(w, "kind" , kind); |
3309 | field(w, "diagnostics" , diagnostics); |
3310 | field(w, "isPreferred" , isPreferred); |
3311 | field(w, "disabled" , disabled); |
3312 | field(w, "edit" , edit); |
3313 | field(w, "command" , command); |
3314 | field(w, "data" , data); |
3315 | } |
3316 | }; |
3317 | |
3318 | class Q_LANGUAGESERVER_EXPORT CodeLensRegistrationOptions : public TextDocumentRegistrationOptions, |
3319 | CodeLensOptions |
3320 | { |
3321 | public: |
3322 | template<typename W> |
3323 | void walk(W &w) |
3324 | { |
3325 | TextDocumentRegistrationOptions::walk(w); |
3326 | CodeLensOptions::walk(w); |
3327 | } |
3328 | }; |
3329 | |
3330 | class Q_LANGUAGESERVER_EXPORT CodeLensParams : public WorkDoneProgressParams, PartialResultParams |
3331 | { |
3332 | public: |
3333 | TextDocumentIdentifier textDocument = {}; |
3334 | |
3335 | template<typename W> |
3336 | void walk(W &w) |
3337 | { |
3338 | WorkDoneProgressParams::walk(w); |
3339 | PartialResultParams::walk(w); |
3340 | field(w, "textDocument" , textDocument); |
3341 | } |
3342 | }; |
3343 | |
3344 | class Q_LANGUAGESERVER_EXPORT CodeLens |
3345 | { |
3346 | public: |
3347 | Range range = {}; |
3348 | std::optional<Command> command = {}; |
3349 | std::optional<QJsonValue> data = {}; |
3350 | |
3351 | template<typename W> |
3352 | void walk(W &w) |
3353 | { |
3354 | field(w, "range" , range); |
3355 | field(w, "command" , command); |
3356 | field(w, "data" , data); |
3357 | } |
3358 | }; |
3359 | |
3360 | class Q_LANGUAGESERVER_EXPORT CodeLensWorkspaceClientCapabilities |
3361 | { |
3362 | public: |
3363 | std::optional<bool> refreshSupport = {}; |
3364 | |
3365 | template<typename W> |
3366 | void walk(W &w) |
3367 | { |
3368 | field(w, "refreshSupport" , refreshSupport); |
3369 | } |
3370 | }; |
3371 | |
3372 | class Q_LANGUAGESERVER_EXPORT DocumentLinkRegistrationOptions |
3373 | : public TextDocumentRegistrationOptions, |
3374 | DocumentLinkOptions |
3375 | { |
3376 | public: |
3377 | template<typename W> |
3378 | void walk(W &w) |
3379 | { |
3380 | TextDocumentRegistrationOptions::walk(w); |
3381 | DocumentLinkOptions::walk(w); |
3382 | } |
3383 | }; |
3384 | |
3385 | class Q_LANGUAGESERVER_EXPORT DocumentLinkParams : public WorkDoneProgressParams, |
3386 | PartialResultParams |
3387 | { |
3388 | public: |
3389 | TextDocumentIdentifier textDocument = {}; |
3390 | |
3391 | template<typename W> |
3392 | void walk(W &w) |
3393 | { |
3394 | WorkDoneProgressParams::walk(w); |
3395 | PartialResultParams::walk(w); |
3396 | field(w, "textDocument" , textDocument); |
3397 | } |
3398 | }; |
3399 | |
3400 | class Q_LANGUAGESERVER_EXPORT DocumentLink |
3401 | { |
3402 | public: |
3403 | Range range = {}; |
3404 | std::optional<QByteArray> target = {}; |
3405 | std::optional<QByteArray> tooltip = {}; |
3406 | std::optional<QJsonValue> data = {}; |
3407 | |
3408 | template<typename W> |
3409 | void walk(W &w) |
3410 | { |
3411 | field(w, "range" , range); |
3412 | field(w, "target" , target); |
3413 | field(w, "tooltip" , tooltip); |
3414 | field(w, "data" , data); |
3415 | } |
3416 | }; |
3417 | |
3418 | class Q_LANGUAGESERVER_EXPORT DocumentColorParams : public WorkDoneProgressParams, |
3419 | PartialResultParams |
3420 | { |
3421 | public: |
3422 | TextDocumentIdentifier textDocument = {}; |
3423 | |
3424 | template<typename W> |
3425 | void walk(W &w) |
3426 | { |
3427 | WorkDoneProgressParams::walk(w); |
3428 | PartialResultParams::walk(w); |
3429 | field(w, "textDocument" , textDocument); |
3430 | } |
3431 | }; |
3432 | |
3433 | class Q_LANGUAGESERVER_EXPORT Color |
3434 | { |
3435 | public: |
3436 | int red = {}; |
3437 | int green = {}; |
3438 | int blue = {}; |
3439 | int alpha = {}; |
3440 | |
3441 | template<typename W> |
3442 | void walk(W &w) |
3443 | { |
3444 | field(w, "red" , red); |
3445 | field(w, "green" , green); |
3446 | field(w, "blue" , blue); |
3447 | field(w, "alpha" , alpha); |
3448 | } |
3449 | }; |
3450 | |
3451 | class Q_LANGUAGESERVER_EXPORT ColorInformation |
3452 | { |
3453 | public: |
3454 | Range range = {}; |
3455 | Color color = {}; |
3456 | |
3457 | template<typename W> |
3458 | void walk(W &w) |
3459 | { |
3460 | field(w, "range" , range); |
3461 | field(w, "color" , color); |
3462 | } |
3463 | }; |
3464 | |
3465 | class Q_LANGUAGESERVER_EXPORT ColorPresentationParams : public WorkDoneProgressParams, |
3466 | PartialResultParams |
3467 | { |
3468 | public: |
3469 | TextDocumentIdentifier textDocument = {}; |
3470 | Color color = {}; |
3471 | Range range = {}; |
3472 | |
3473 | template<typename W> |
3474 | void walk(W &w) |
3475 | { |
3476 | WorkDoneProgressParams::walk(w); |
3477 | PartialResultParams::walk(w); |
3478 | field(w, "textDocument" , textDocument); |
3479 | field(w, "color" , color); |
3480 | field(w, "range" , range); |
3481 | } |
3482 | }; |
3483 | |
3484 | class Q_LANGUAGESERVER_EXPORT ColorPresentation |
3485 | { |
3486 | public: |
3487 | QByteArray label = {}; |
3488 | std::optional<TextEdit> textEdit = {}; |
3489 | std::optional<QList<TextEdit>> additionalTextEdits = {}; |
3490 | |
3491 | template<typename W> |
3492 | void walk(W &w) |
3493 | { |
3494 | field(w, "label" , label); |
3495 | field(w, "textEdit" , textEdit); |
3496 | field(w, "additionalTextEdits" , additionalTextEdits); |
3497 | } |
3498 | }; |
3499 | |
3500 | class Q_LANGUAGESERVER_EXPORT DocumentFormattingRegistrationOptions |
3501 | : public TextDocumentRegistrationOptions, |
3502 | DocumentFormattingOptions |
3503 | { |
3504 | public: |
3505 | template<typename W> |
3506 | void walk(W &w) |
3507 | { |
3508 | TextDocumentRegistrationOptions::walk(w); |
3509 | DocumentFormattingOptions::walk(w); |
3510 | } |
3511 | }; |
3512 | |
3513 | class Q_LANGUAGESERVER_EXPORT FormattingOptions |
3514 | { |
3515 | public: |
3516 | int tabSize = {}; |
3517 | bool insertSpaces = {}; |
3518 | std::optional<bool> trimTrailingWhitespace = {}; |
3519 | std::optional<bool> insertFinalNewline = {}; |
3520 | std::optional<bool> trimFinalNewlines = {}; |
3521 | QJsonObject ; |
3522 | |
3523 | template<typename W> |
3524 | void walk(W &w) |
3525 | { |
3526 | field(w, "tabSize" , tabSize); |
3527 | field(w, "insertSpaces" , insertSpaces); |
3528 | field(w, "trimTrailingWhitespace" , trimTrailingWhitespace); |
3529 | field(w, "insertFinalNewline" , insertFinalNewline); |
3530 | field(w, "trimFinalNewlines" , trimFinalNewlines); |
3531 | } |
3532 | template<typename W> |
3533 | void (W &w) |
3534 | { |
3535 | w.handleExtras(extraFields); |
3536 | } |
3537 | }; |
3538 | |
3539 | class Q_LANGUAGESERVER_EXPORT DocumentFormattingParams : public WorkDoneProgressParams |
3540 | { |
3541 | public: |
3542 | TextDocumentIdentifier textDocument = {}; |
3543 | FormattingOptions options = {}; |
3544 | |
3545 | template<typename W> |
3546 | void walk(W &w) |
3547 | { |
3548 | WorkDoneProgressParams::walk(w); |
3549 | field(w, "textDocument" , textDocument); |
3550 | field(w, "options" , options); |
3551 | } |
3552 | }; |
3553 | |
3554 | class Q_LANGUAGESERVER_EXPORT DocumentRangeFormattingRegistrationOptions |
3555 | : public TextDocumentRegistrationOptions, |
3556 | DocumentRangeFormattingOptions |
3557 | { |
3558 | public: |
3559 | template<typename W> |
3560 | void walk(W &w) |
3561 | { |
3562 | TextDocumentRegistrationOptions::walk(w); |
3563 | DocumentRangeFormattingOptions::walk(w); |
3564 | } |
3565 | }; |
3566 | |
3567 | class Q_LANGUAGESERVER_EXPORT DocumentRangeFormattingParams : public WorkDoneProgressParams |
3568 | { |
3569 | public: |
3570 | TextDocumentIdentifier textDocument = {}; |
3571 | Range range = {}; |
3572 | FormattingOptions options = {}; |
3573 | |
3574 | template<typename W> |
3575 | void walk(W &w) |
3576 | { |
3577 | WorkDoneProgressParams::walk(w); |
3578 | field(w, "textDocument" , textDocument); |
3579 | field(w, "range" , range); |
3580 | field(w, "options" , options); |
3581 | } |
3582 | }; |
3583 | |
3584 | class Q_LANGUAGESERVER_EXPORT DocumentOnTypeFormattingRegistrationOptions |
3585 | : public TextDocumentRegistrationOptions, |
3586 | DocumentOnTypeFormattingOptions |
3587 | { |
3588 | public: |
3589 | template<typename W> |
3590 | void walk(W &w) |
3591 | { |
3592 | TextDocumentRegistrationOptions::walk(w); |
3593 | DocumentOnTypeFormattingOptions::walk(w); |
3594 | } |
3595 | }; |
3596 | |
3597 | class Q_LANGUAGESERVER_EXPORT DocumentOnTypeFormattingParams : public TextDocumentPositionParams |
3598 | { |
3599 | public: |
3600 | QByteArray ch = {}; |
3601 | FormattingOptions options = {}; |
3602 | |
3603 | template<typename W> |
3604 | void walk(W &w) |
3605 | { |
3606 | TextDocumentPositionParams::walk(w); |
3607 | field(w, "ch" , ch); |
3608 | field(w, "options" , options); |
3609 | } |
3610 | }; |
3611 | |
3612 | class Q_LANGUAGESERVER_EXPORT RenameRegistrationOptions : public TextDocumentRegistrationOptions, |
3613 | RenameOptions |
3614 | { |
3615 | public: |
3616 | template<typename W> |
3617 | void walk(W &w) |
3618 | { |
3619 | TextDocumentRegistrationOptions::walk(w); |
3620 | RenameOptions::walk(w); |
3621 | } |
3622 | }; |
3623 | |
3624 | class Q_LANGUAGESERVER_EXPORT RenameParams : public TextDocumentPositionParams, |
3625 | WorkDoneProgressParams |
3626 | { |
3627 | public: |
3628 | QByteArray newName = {}; |
3629 | |
3630 | template<typename W> |
3631 | void walk(W &w) |
3632 | { |
3633 | TextDocumentPositionParams::walk(w); |
3634 | WorkDoneProgressParams::walk(w); |
3635 | field(w, "newName" , newName); |
3636 | } |
3637 | }; |
3638 | |
3639 | class Q_LANGUAGESERVER_EXPORT PrepareRenameParams : public TextDocumentPositionParams |
3640 | { |
3641 | public: |
3642 | template<typename W> |
3643 | void walk(W &w) |
3644 | { |
3645 | TextDocumentPositionParams::walk(w); |
3646 | } |
3647 | }; |
3648 | |
3649 | class Q_LANGUAGESERVER_EXPORT FoldingRangeParams : public WorkDoneProgressParams, |
3650 | PartialResultParams |
3651 | { |
3652 | public: |
3653 | TextDocumentIdentifier textDocument = {}; |
3654 | |
3655 | template<typename W> |
3656 | void walk(W &w) |
3657 | { |
3658 | WorkDoneProgressParams::walk(w); |
3659 | PartialResultParams::walk(w); |
3660 | field(w, "textDocument" , textDocument); |
3661 | } |
3662 | }; |
3663 | |
3664 | class Q_LANGUAGESERVER_EXPORT FoldingRange |
3665 | { |
3666 | public: |
3667 | int startLine = {}; |
3668 | std::optional<int> startCharacter = {}; |
3669 | int endLine = {}; |
3670 | std::optional<int> endCharacter = {}; |
3671 | std::optional<QByteArray> kind = {}; |
3672 | |
3673 | template<typename W> |
3674 | void walk(W &w) |
3675 | { |
3676 | field(w, "startLine" , startLine); |
3677 | field(w, "startCharacter" , startCharacter); |
3678 | field(w, "endLine" , endLine); |
3679 | field(w, "endCharacter" , endCharacter); |
3680 | field(w, "kind" , kind); |
3681 | } |
3682 | }; |
3683 | |
3684 | class Q_LANGUAGESERVER_EXPORT SelectionRangeParams : public WorkDoneProgressParams, |
3685 | PartialResultParams |
3686 | { |
3687 | public: |
3688 | TextDocumentIdentifier textDocument = {}; |
3689 | QList<Position> positions = {}; |
3690 | |
3691 | template<typename W> |
3692 | void walk(W &w) |
3693 | { |
3694 | WorkDoneProgressParams::walk(w); |
3695 | PartialResultParams::walk(w); |
3696 | field(w, "textDocument" , textDocument); |
3697 | field(w, "positions" , positions); |
3698 | } |
3699 | }; |
3700 | |
3701 | class Q_LANGUAGESERVER_EXPORT CallHierarchyPrepareParams : public TextDocumentPositionParams, |
3702 | WorkDoneProgressParams |
3703 | { |
3704 | public: |
3705 | template<typename W> |
3706 | void walk(W &w) |
3707 | { |
3708 | TextDocumentPositionParams::walk(w); |
3709 | WorkDoneProgressParams::walk(w); |
3710 | } |
3711 | }; |
3712 | |
3713 | class Q_LANGUAGESERVER_EXPORT CallHierarchyItem |
3714 | { |
3715 | public: |
3716 | QByteArray name = {}; |
3717 | QJsonValue kind = {}; |
3718 | std::optional<QList<int>> tags = {}; |
3719 | std::optional<QByteArray> detail = {}; |
3720 | QByteArray uri = {}; |
3721 | Range range = {}; |
3722 | Range selectionRange = {}; |
3723 | std::optional<QJsonValue> data = {}; |
3724 | |
3725 | template<typename W> |
3726 | void walk(W &w) |
3727 | { |
3728 | field(w, "name" , name); |
3729 | field(w, "kind" , kind); |
3730 | field(w, "tags" , tags); |
3731 | field(w, "detail" , detail); |
3732 | field(w, "uri" , uri); |
3733 | field(w, "range" , range); |
3734 | field(w, "selectionRange" , selectionRange); |
3735 | field(w, "data" , data); |
3736 | } |
3737 | }; |
3738 | |
3739 | class Q_LANGUAGESERVER_EXPORT CallHierarchyIncomingCallsParams : public WorkDoneProgressParams, |
3740 | PartialResultParams |
3741 | { |
3742 | public: |
3743 | CallHierarchyItem item = {}; |
3744 | |
3745 | template<typename W> |
3746 | void walk(W &w) |
3747 | { |
3748 | WorkDoneProgressParams::walk(w); |
3749 | PartialResultParams::walk(w); |
3750 | field(w, "item" , item); |
3751 | } |
3752 | }; |
3753 | |
3754 | class Q_LANGUAGESERVER_EXPORT CallHierarchyIncomingCall |
3755 | { |
3756 | public: |
3757 | CallHierarchyItem from = {}; |
3758 | QList<Range> fromRanges = {}; |
3759 | |
3760 | template<typename W> |
3761 | void walk(W &w) |
3762 | { |
3763 | field(w, "from" , from); |
3764 | field(w, "fromRanges" , fromRanges); |
3765 | } |
3766 | }; |
3767 | |
3768 | class Q_LANGUAGESERVER_EXPORT CallHierarchyOutgoingCallsParams : public WorkDoneProgressParams, |
3769 | PartialResultParams |
3770 | { |
3771 | public: |
3772 | CallHierarchyItem item = {}; |
3773 | |
3774 | template<typename W> |
3775 | void walk(W &w) |
3776 | { |
3777 | WorkDoneProgressParams::walk(w); |
3778 | PartialResultParams::walk(w); |
3779 | field(w, "item" , item); |
3780 | } |
3781 | }; |
3782 | |
3783 | class Q_LANGUAGESERVER_EXPORT CallHierarchyOutgoingCall |
3784 | { |
3785 | public: |
3786 | CallHierarchyItem to = {}; |
3787 | QList<Range> fromRanges = {}; |
3788 | |
3789 | template<typename W> |
3790 | void walk(W &w) |
3791 | { |
3792 | field(w, "to" , to); |
3793 | field(w, "fromRanges" , fromRanges); |
3794 | } |
3795 | }; |
3796 | |
3797 | class Q_LANGUAGESERVER_EXPORT SemanticTokensParams : public WorkDoneProgressParams, |
3798 | PartialResultParams |
3799 | { |
3800 | public: |
3801 | TextDocumentIdentifier textDocument = {}; |
3802 | |
3803 | template<typename W> |
3804 | void walk(W &w) |
3805 | { |
3806 | WorkDoneProgressParams::walk(w); |
3807 | PartialResultParams::walk(w); |
3808 | field(w, "textDocument" , textDocument); |
3809 | } |
3810 | }; |
3811 | |
3812 | class Q_LANGUAGESERVER_EXPORT SemanticTokens |
3813 | { |
3814 | public: |
3815 | std::optional<QByteArray> resultId = {}; |
3816 | QList<int> data = {}; |
3817 | |
3818 | template<typename W> |
3819 | void walk(W &w) |
3820 | { |
3821 | field(w, "resultId" , resultId); |
3822 | field(w, "data" , data); |
3823 | } |
3824 | }; |
3825 | |
3826 | class Q_LANGUAGESERVER_EXPORT SemanticTokensPartialResult |
3827 | { |
3828 | public: |
3829 | QList<int> data = {}; |
3830 | |
3831 | template<typename W> |
3832 | void walk(W &w) |
3833 | { |
3834 | field(w, "data" , data); |
3835 | } |
3836 | }; |
3837 | |
3838 | class Q_LANGUAGESERVER_EXPORT SemanticTokensDeltaParams : public WorkDoneProgressParams, |
3839 | PartialResultParams |
3840 | { |
3841 | public: |
3842 | TextDocumentIdentifier textDocument = {}; |
3843 | QByteArray previousResultId = {}; |
3844 | |
3845 | template<typename W> |
3846 | void walk(W &w) |
3847 | { |
3848 | WorkDoneProgressParams::walk(w); |
3849 | PartialResultParams::walk(w); |
3850 | field(w, "textDocument" , textDocument); |
3851 | field(w, "previousResultId" , previousResultId); |
3852 | } |
3853 | }; |
3854 | |
3855 | class Q_LANGUAGESERVER_EXPORT SemanticTokensEdit |
3856 | { |
3857 | public: |
3858 | int start = {}; |
3859 | int deleteCount = {}; |
3860 | std::optional<QList<int>> data = {}; |
3861 | |
3862 | template<typename W> |
3863 | void walk(W &w) |
3864 | { |
3865 | field(w, "start" , start); |
3866 | field(w, "deleteCount" , deleteCount); |
3867 | field(w, "data" , data); |
3868 | } |
3869 | }; |
3870 | |
3871 | class Q_LANGUAGESERVER_EXPORT SemanticTokensDelta |
3872 | { |
3873 | public: |
3874 | std::optional<QByteArray> resultId = {}; |
3875 | QList<SemanticTokensEdit> edits = {}; |
3876 | |
3877 | template<typename W> |
3878 | void walk(W &w) |
3879 | { |
3880 | field(w, "resultId" , resultId); |
3881 | field(w, "edits" , edits); |
3882 | } |
3883 | }; |
3884 | |
3885 | class Q_LANGUAGESERVER_EXPORT SemanticTokensDeltaPartialResult |
3886 | { |
3887 | public: |
3888 | QList<SemanticTokensEdit> edits = {}; |
3889 | |
3890 | template<typename W> |
3891 | void walk(W &w) |
3892 | { |
3893 | field(w, "edits" , edits); |
3894 | } |
3895 | }; |
3896 | |
3897 | class Q_LANGUAGESERVER_EXPORT SemanticTokensRangeParams : public WorkDoneProgressParams, |
3898 | PartialResultParams |
3899 | { |
3900 | public: |
3901 | TextDocumentIdentifier textDocument = {}; |
3902 | Range range = {}; |
3903 | |
3904 | template<typename W> |
3905 | void walk(W &w) |
3906 | { |
3907 | WorkDoneProgressParams::walk(w); |
3908 | PartialResultParams::walk(w); |
3909 | field(w, "textDocument" , textDocument); |
3910 | field(w, "range" , range); |
3911 | } |
3912 | }; |
3913 | |
3914 | class Q_LANGUAGESERVER_EXPORT SemanticTokensWorkspaceClientCapabilities |
3915 | { |
3916 | public: |
3917 | std::optional<bool> refreshSupport = {}; |
3918 | |
3919 | template<typename W> |
3920 | void walk(W &w) |
3921 | { |
3922 | field(w, "refreshSupport" , refreshSupport); |
3923 | } |
3924 | }; |
3925 | |
3926 | class Q_LANGUAGESERVER_EXPORT LinkedEditingRangeParams : public TextDocumentPositionParams, |
3927 | WorkDoneProgressParams |
3928 | { |
3929 | public: |
3930 | template<typename W> |
3931 | void walk(W &w) |
3932 | { |
3933 | TextDocumentPositionParams::walk(w); |
3934 | WorkDoneProgressParams::walk(w); |
3935 | } |
3936 | }; |
3937 | |
3938 | class Q_LANGUAGESERVER_EXPORT LinkedEditingRanges |
3939 | { |
3940 | public: |
3941 | QList<Range> ranges = {}; |
3942 | std::optional<QByteArray> wordPattern = {}; |
3943 | |
3944 | template<typename W> |
3945 | void walk(W &w) |
3946 | { |
3947 | field(w, "ranges" , ranges); |
3948 | field(w, "wordPattern" , wordPattern); |
3949 | } |
3950 | }; |
3951 | |
3952 | class Q_LANGUAGESERVER_EXPORT MonikerParams : public TextDocumentPositionParams, |
3953 | WorkDoneProgressParams, |
3954 | PartialResultParams |
3955 | { |
3956 | public: |
3957 | template<typename W> |
3958 | void walk(W &w) |
3959 | { |
3960 | TextDocumentPositionParams::walk(w); |
3961 | WorkDoneProgressParams::walk(w); |
3962 | PartialResultParams::walk(w); |
3963 | } |
3964 | }; |
3965 | |
3966 | class Q_LANGUAGESERVER_EXPORT Moniker |
3967 | { |
3968 | public: |
3969 | QByteArray scheme = {}; |
3970 | QByteArray identifier = {}; |
3971 | UniquenessLevel unique = {}; |
3972 | std::optional<MonikerKind> kind = {}; |
3973 | |
3974 | template<typename W> |
3975 | void walk(W &w) |
3976 | { |
3977 | field(w, "scheme" , scheme); |
3978 | field(w, "identifier" , identifier); |
3979 | field(w, "unique" , unique); |
3980 | field(w, "kind" , kind); |
3981 | } |
3982 | }; |
3983 | |
3984 | } // namespace QLspSpecification |
3985 | |
3986 | namespace QTypedJson { |
3987 | |
3988 | template<> |
3989 | inline QString enumToString<QLspSpecification::TraceValue>(QLspSpecification::TraceValue value) |
3990 | { |
3991 | switch (value) { |
3992 | case QLspSpecification::TraceValue::Off: |
3993 | return QLatin1String("off" ); |
3994 | case QLspSpecification::TraceValue::Messages: |
3995 | return QLatin1String("messages" ); |
3996 | case QLspSpecification::TraceValue::Verbose: |
3997 | return QLatin1String("verbose" ); |
3998 | } |
3999 | return QString(); |
4000 | } |
4001 | |
4002 | template<> |
4003 | inline QString enumToString<QLspSpecification::ErrorCodes>(QLspSpecification::ErrorCodes value) |
4004 | { |
4005 | return enumToIntString<QLspSpecification::ErrorCodes>(value); |
4006 | } |
4007 | |
4008 | template<> |
4009 | inline QString |
4010 | enumToString<QLspSpecification::DiagnosticSeverity>(QLspSpecification::DiagnosticSeverity value) |
4011 | { |
4012 | return enumToIntString<QLspSpecification::DiagnosticSeverity>(value); |
4013 | } |
4014 | |
4015 | template<> |
4016 | inline QString |
4017 | enumToString<QLspSpecification::DiagnosticTag>(QLspSpecification::DiagnosticTag value) |
4018 | { |
4019 | return enumToIntString<QLspSpecification::DiagnosticTag>(value); |
4020 | } |
4021 | |
4022 | template<> |
4023 | inline QString enumToString<QLspSpecification::ResourceOperationKind>( |
4024 | QLspSpecification::ResourceOperationKind value) |
4025 | { |
4026 | switch (value) { |
4027 | case QLspSpecification::ResourceOperationKind::Create: |
4028 | return QLatin1String("create" ); |
4029 | case QLspSpecification::ResourceOperationKind::Rename: |
4030 | return QLatin1String("rename" ); |
4031 | case QLspSpecification::ResourceOperationKind::Delete: |
4032 | return QLatin1String("delete" ); |
4033 | default: |
4034 | return QString::number(int(value)); |
4035 | } |
4036 | } |
4037 | |
4038 | template<> |
4039 | inline QString |
4040 | enumToString<QLspSpecification::FailureHandlingKind>(QLspSpecification::FailureHandlingKind value) |
4041 | { |
4042 | switch (value) { |
4043 | case QLspSpecification::FailureHandlingKind::Abort: |
4044 | return QLatin1String("abort" ); |
4045 | case QLspSpecification::FailureHandlingKind::Transactional: |
4046 | return QLatin1String("transactional" ); |
4047 | case QLspSpecification::FailureHandlingKind::TextOnlyTransactional: |
4048 | return QLatin1String("textOnlyTransactional" ); |
4049 | case QLspSpecification::FailureHandlingKind::Undo: |
4050 | return QLatin1String("undo" ); |
4051 | default: |
4052 | return QString::number(int(value)); |
4053 | } |
4054 | } |
4055 | |
4056 | template<> |
4057 | inline QString enumToString<QLspSpecification::MarkupKind>(QLspSpecification::MarkupKind value) |
4058 | { |
4059 | switch (value) { |
4060 | case QLspSpecification::MarkupKind::PlainText: |
4061 | return QLatin1String("plaintext" ); |
4062 | case QLspSpecification::MarkupKind::Markdown: |
4063 | return QLatin1String("markdown" ); |
4064 | default: |
4065 | return QString::number(int(value)); |
4066 | } |
4067 | } |
4068 | |
4069 | template<> |
4070 | inline QString |
4071 | enumToString<QLspSpecification::InitializeErrorCode>(QLspSpecification::InitializeErrorCode value) |
4072 | { |
4073 | return enumToIntString<QLspSpecification::InitializeErrorCode>(value); |
4074 | } |
4075 | |
4076 | template<> |
4077 | inline QString enumToString<QLspSpecification::MessageType>(QLspSpecification::MessageType value) |
4078 | { |
4079 | return enumToIntString<QLspSpecification::MessageType>(value); |
4080 | } |
4081 | |
4082 | template<> |
4083 | inline QString enumToString<QLspSpecification::WatchKind>(QLspSpecification::WatchKind value) |
4084 | { |
4085 | return enumToIntString<QLspSpecification::WatchKind>(value); |
4086 | } |
4087 | |
4088 | template<> |
4089 | inline QString |
4090 | enumToString<QLspSpecification::FileChangeType>(QLspSpecification::FileChangeType value) |
4091 | { |
4092 | return enumToIntString<QLspSpecification::FileChangeType>(value); |
4093 | } |
4094 | |
4095 | template<> |
4096 | inline QString enumToString<QLspSpecification::FileOperationPatternKind>( |
4097 | QLspSpecification::FileOperationPatternKind value) |
4098 | { |
4099 | switch (value) { |
4100 | case QLspSpecification::FileOperationPatternKind::File: |
4101 | return QLatin1String("file" ); |
4102 | case QLspSpecification::FileOperationPatternKind::Folder: |
4103 | return QLatin1String("folder" ); |
4104 | default: |
4105 | return QString::number(int(value)); |
4106 | } |
4107 | } |
4108 | |
4109 | template<> |
4110 | inline QString |
4111 | enumToString<QLspSpecification::TextDocumentSyncKind>(QLspSpecification::TextDocumentSyncKind value) |
4112 | { |
4113 | return enumToIntString<QLspSpecification::TextDocumentSyncKind>(value); |
4114 | } |
4115 | |
4116 | template<> |
4117 | inline QString enumToString<QLspSpecification::TextDocumentSaveReason>( |
4118 | QLspSpecification::TextDocumentSaveReason value) |
4119 | { |
4120 | return enumToIntString<QLspSpecification::TextDocumentSaveReason>(value); |
4121 | } |
4122 | |
4123 | template<> |
4124 | inline QString enumToString<QLspSpecification::CompletionTriggerKind>( |
4125 | QLspSpecification::CompletionTriggerKind value) |
4126 | { |
4127 | return enumToIntString<QLspSpecification::CompletionTriggerKind>(value); |
4128 | } |
4129 | |
4130 | template<> |
4131 | inline QString |
4132 | enumToString<QLspSpecification::InsertTextFormat>(QLspSpecification::InsertTextFormat value) |
4133 | { |
4134 | return enumToIntString<QLspSpecification::InsertTextFormat>(value); |
4135 | } |
4136 | |
4137 | template<> |
4138 | inline QString |
4139 | enumToString<QLspSpecification::CompletionItemTag>(QLspSpecification::CompletionItemTag value) |
4140 | { |
4141 | return enumToIntString<QLspSpecification::CompletionItemTag>(value); |
4142 | } |
4143 | |
4144 | template<> |
4145 | inline QString |
4146 | enumToString<QLspSpecification::InsertTextMode>(QLspSpecification::InsertTextMode value) |
4147 | { |
4148 | return enumToIntString<QLspSpecification::InsertTextMode>(value); |
4149 | } |
4150 | |
4151 | template<> |
4152 | inline QString |
4153 | enumToString<QLspSpecification::CompletionItemKind>(QLspSpecification::CompletionItemKind value) |
4154 | { |
4155 | return enumToIntString<QLspSpecification::CompletionItemKind>(value); |
4156 | } |
4157 | |
4158 | template<> |
4159 | inline QString enumToString<QLspSpecification::SignatureHelpTriggerKind>( |
4160 | QLspSpecification::SignatureHelpTriggerKind value) |
4161 | { |
4162 | return enumToIntString<QLspSpecification::SignatureHelpTriggerKind>(value); |
4163 | } |
4164 | |
4165 | template<> |
4166 | inline QString enumToString<QLspSpecification::DocumentHighlightKind>( |
4167 | QLspSpecification::DocumentHighlightKind value) |
4168 | { |
4169 | return enumToIntString<QLspSpecification::DocumentHighlightKind>(value); |
4170 | } |
4171 | |
4172 | template<> |
4173 | inline QString enumToString<QLspSpecification::SymbolKind>(QLspSpecification::SymbolKind value) |
4174 | { |
4175 | return enumToIntString<QLspSpecification::SymbolKind>(value); |
4176 | } |
4177 | |
4178 | template<> |
4179 | inline QString enumToString<QLspSpecification::SymbolTag>(QLspSpecification::SymbolTag value) |
4180 | { |
4181 | return enumToIntString<QLspSpecification::SymbolTag>(value); |
4182 | } |
4183 | |
4184 | template<> |
4185 | inline QString |
4186 | enumToString<QLspSpecification::CodeActionKind>(QLspSpecification::CodeActionKind value) |
4187 | { |
4188 | switch (value) { |
4189 | case QLspSpecification::CodeActionKind::Empty: |
4190 | return QLatin1String("" ); |
4191 | case QLspSpecification::CodeActionKind::QuickFix: |
4192 | return QLatin1String("quickfix" ); |
4193 | case QLspSpecification::CodeActionKind::Refactor: |
4194 | return QLatin1String("refactor" ); |
4195 | case QLspSpecification::CodeActionKind::RefactorExtract: |
4196 | return QLatin1String("refactor.extract" ); |
4197 | case QLspSpecification::CodeActionKind::RefactorInline: |
4198 | return QLatin1String("refactor.inline" ); |
4199 | case QLspSpecification::CodeActionKind::RefactorRewrite: |
4200 | return QLatin1String("refactor.rewrite" ); |
4201 | case QLspSpecification::CodeActionKind::Source: |
4202 | return QLatin1String("source" ); |
4203 | case QLspSpecification::CodeActionKind::SourceOrganizeImports: |
4204 | return QLatin1String("source.organizeImports" ); |
4205 | default: |
4206 | return QString::number(int(value)); |
4207 | } |
4208 | } |
4209 | |
4210 | template<> |
4211 | inline QLspSpecification::CodeActionKind |
4212 | enumFromString<QLspSpecification::CodeActionKind>(const QString &string) |
4213 | { |
4214 | if (string.compare(other: QLatin1String("" ), cs: Qt::CaseInsensitive) == 0) |
4215 | return QLspSpecification::CodeActionKind::Empty; |
4216 | else if (string.compare(other: QLatin1String("quickfix" ), cs: Qt::CaseInsensitive) == 0) |
4217 | return QLspSpecification::CodeActionKind::QuickFix; |
4218 | else if (string.compare(other: QLatin1String("refactor" ), cs: Qt::CaseInsensitive) == 0) |
4219 | return QLspSpecification::CodeActionKind::Refactor; |
4220 | else if (string.compare(other: QLatin1String("refactor.extract" ), cs: Qt::CaseInsensitive) == 0) |
4221 | return QLspSpecification::CodeActionKind::RefactorExtract; |
4222 | else if (string.compare(other: QLatin1String("refactor.inline" ), cs: Qt::CaseInsensitive) == 0) |
4223 | return QLspSpecification::CodeActionKind::RefactorInline; |
4224 | else if (string.compare(other: QLatin1String("refactor.rewrite" ), cs: Qt::CaseInsensitive) == 0) |
4225 | return QLspSpecification::CodeActionKind::RefactorRewrite; |
4226 | else if (string.compare(other: QLatin1String("source" ), cs: Qt::CaseInsensitive) == 0) |
4227 | return QLspSpecification::CodeActionKind::Source; |
4228 | else if (string.compare(other: QLatin1String("source.organizeImports" ), cs: Qt::CaseInsensitive) == 0) |
4229 | return QLspSpecification::CodeActionKind::SourceOrganizeImports; |
4230 | return QLspSpecification::CodeActionKind {}; |
4231 | } |
4232 | |
4233 | template<> |
4234 | inline QString enumToString<QLspSpecification::PrepareSupportDefaultBehavior>( |
4235 | QLspSpecification::PrepareSupportDefaultBehavior value) |
4236 | { |
4237 | return enumToIntString<QLspSpecification::PrepareSupportDefaultBehavior>(value); |
4238 | } |
4239 | |
4240 | template<> |
4241 | inline QString |
4242 | enumToString<QLspSpecification::FoldingRangeKind>(QLspSpecification::FoldingRangeKind value) |
4243 | { |
4244 | switch (value) { |
4245 | case QLspSpecification::FoldingRangeKind::Comment: |
4246 | return QLatin1String("comment" ); |
4247 | case QLspSpecification::FoldingRangeKind::Imports: |
4248 | return QLatin1String("imports" ); |
4249 | case QLspSpecification::FoldingRangeKind::Region: |
4250 | return QLatin1String("region" ); |
4251 | default: |
4252 | return QString::number(int(value)); |
4253 | } |
4254 | } |
4255 | |
4256 | template<> |
4257 | inline QString |
4258 | enumToString<QLspSpecification::SemanticTokenTypes>(QLspSpecification::SemanticTokenTypes value) |
4259 | { |
4260 | switch (value) { |
4261 | case QLspSpecification::SemanticTokenTypes::Namespace: |
4262 | return QLatin1String("namespace" ); |
4263 | case QLspSpecification::SemanticTokenTypes::Type: |
4264 | return QLatin1String("type" ); |
4265 | case QLspSpecification::SemanticTokenTypes::Class: |
4266 | return QLatin1String("class" ); |
4267 | case QLspSpecification::SemanticTokenTypes::Enum: |
4268 | return QLatin1String("enum" ); |
4269 | case QLspSpecification::SemanticTokenTypes::Interface: |
4270 | return QLatin1String("interface" ); |
4271 | case QLspSpecification::SemanticTokenTypes::Struct: |
4272 | return QLatin1String("struct" ); |
4273 | case QLspSpecification::SemanticTokenTypes::TypeParameter: |
4274 | return QLatin1String("typeParameter" ); |
4275 | case QLspSpecification::SemanticTokenTypes::Parameter: |
4276 | return QLatin1String("parameter" ); |
4277 | case QLspSpecification::SemanticTokenTypes::Variable: |
4278 | return QLatin1String("variable" ); |
4279 | case QLspSpecification::SemanticTokenTypes::Property: |
4280 | return QLatin1String("property" ); |
4281 | case QLspSpecification::SemanticTokenTypes::EnumMember: |
4282 | return QLatin1String("enumMember" ); |
4283 | case QLspSpecification::SemanticTokenTypes::Event: |
4284 | return QLatin1String("event" ); |
4285 | case QLspSpecification::SemanticTokenTypes::Function: |
4286 | return QLatin1String("function" ); |
4287 | case QLspSpecification::SemanticTokenTypes::Method: |
4288 | return QLatin1String("method" ); |
4289 | case QLspSpecification::SemanticTokenTypes::Macro: |
4290 | return QLatin1String("macro" ); |
4291 | case QLspSpecification::SemanticTokenTypes::Keyword: |
4292 | return QLatin1String("keyword" ); |
4293 | case QLspSpecification::SemanticTokenTypes::Modifier: |
4294 | return QLatin1String("modifier" ); |
4295 | case QLspSpecification::SemanticTokenTypes::Comment: |
4296 | return QLatin1String("comment" ); |
4297 | case QLspSpecification::SemanticTokenTypes::String: |
4298 | return QLatin1String("string" ); |
4299 | case QLspSpecification::SemanticTokenTypes::Number: |
4300 | return QLatin1String("number" ); |
4301 | case QLspSpecification::SemanticTokenTypes::Regexp: |
4302 | return QLatin1String("regexp" ); |
4303 | case QLspSpecification::SemanticTokenTypes::Operator: |
4304 | return QLatin1String("operator" ); |
4305 | default: |
4306 | return QString::number(int(value)); |
4307 | } |
4308 | } |
4309 | |
4310 | template<> |
4311 | inline QString enumToString<QLspSpecification::SemanticTokenModifiers>( |
4312 | QLspSpecification::SemanticTokenModifiers value) |
4313 | { |
4314 | switch (value) { |
4315 | case QLspSpecification::SemanticTokenModifiers::Declaration: |
4316 | return QLatin1String("declaration" ); |
4317 | case QLspSpecification::SemanticTokenModifiers::Definition: |
4318 | return QLatin1String("definition" ); |
4319 | case QLspSpecification::SemanticTokenModifiers::Readonly: |
4320 | return QLatin1String("readonly" ); |
4321 | case QLspSpecification::SemanticTokenModifiers::Static: |
4322 | return QLatin1String("static" ); |
4323 | case QLspSpecification::SemanticTokenModifiers::Deprecated: |
4324 | return QLatin1String("deprecated" ); |
4325 | case QLspSpecification::SemanticTokenModifiers::Abstract: |
4326 | return QLatin1String("abstract" ); |
4327 | case QLspSpecification::SemanticTokenModifiers::Async: |
4328 | return QLatin1String("async" ); |
4329 | case QLspSpecification::SemanticTokenModifiers::Modification: |
4330 | return QLatin1String("modification" ); |
4331 | case QLspSpecification::SemanticTokenModifiers::Documentation: |
4332 | return QLatin1String("documentation" ); |
4333 | case QLspSpecification::SemanticTokenModifiers::DefaultLibrary: |
4334 | return QLatin1String("defaultLibrary" ); |
4335 | default: |
4336 | return QString::number(int(value)); |
4337 | } |
4338 | } |
4339 | |
4340 | template<> |
4341 | inline QString enumToString<QLspSpecification::TokenFormat>(QLspSpecification::TokenFormat value) |
4342 | { |
4343 | switch (value) { |
4344 | case QLspSpecification::TokenFormat::Relative: |
4345 | return QLatin1String("relative" ); |
4346 | default: |
4347 | return QString::number(int(value)); |
4348 | } |
4349 | } |
4350 | |
4351 | template<> |
4352 | inline QString |
4353 | enumToString<QLspSpecification::UniquenessLevel>(QLspSpecification::UniquenessLevel value) |
4354 | { |
4355 | switch (value) { |
4356 | case QLspSpecification::UniquenessLevel::Document: |
4357 | return QLatin1String("document" ); |
4358 | case QLspSpecification::UniquenessLevel::Project: |
4359 | return QLatin1String("project" ); |
4360 | case QLspSpecification::UniquenessLevel::Group: |
4361 | return QLatin1String("group" ); |
4362 | case QLspSpecification::UniquenessLevel::Scheme: |
4363 | return QLatin1String("scheme" ); |
4364 | case QLspSpecification::UniquenessLevel::Global: |
4365 | return QLatin1String("global" ); |
4366 | default: |
4367 | return QString::number(int(value)); |
4368 | } |
4369 | } |
4370 | |
4371 | template<> |
4372 | inline QString enumToString<QLspSpecification::MonikerKind>(QLspSpecification::MonikerKind value) |
4373 | { |
4374 | switch (value) { |
4375 | case QLspSpecification::MonikerKind::Import: |
4376 | return QLatin1String("import" ); |
4377 | case QLspSpecification::MonikerKind::Export: |
4378 | return QLatin1String("export" ); |
4379 | case QLspSpecification::MonikerKind::Local: |
4380 | return QLatin1String("local" ); |
4381 | default: |
4382 | return QString::number(int(value)); |
4383 | } |
4384 | } |
4385 | |
4386 | } // namespace QTypedJson |
4387 | QT_END_NAMESPACE |
4388 | #endif // QLANGUAGESERVERSPECTYPES_P_H |
4389 | |