summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/LspCpp/LibLsp/lsp/ProtocolJsonHandler.cpp
blob: 90e3fcda0865a2e3dd4cc126231d8c45f48a6e5c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
#include "ProtocolJsonHandler.h"
#include "general/initialize.h"
#include "general/shutdown.h"
#include "textDocument/code_action.h"
#include "textDocument/code_lens.h"
#include "textDocument/completion.h"


#include "textDocument/did_close.h"

#include "textDocument/highlight.h"
#include "textDocument/document_link.h"
#include "textDocument/formatting.h"
#include "textDocument/hover.h"
#include "textDocument/implementation.h"
#include "textDocument/range_formatting.h"
#include "textDocument/references.h"
#include "textDocument/rename.h"
#include "textDocument/signature_help.h"
#include "textDocument/type_definition.h"
#include "workspace/symbol.h"
#include "textDocument/typeHierarchy.h"
#include "out_list.h"
#include "extention/jdtls/codeActionResult.h"
#include "textDocument/declaration_definition.h"
#include "textDocument/resolveCompletionItem.h"
#include "textDocument/resolveCodeLens.h"
#include "textDocument/colorPresentation.h"
#include "textDocument/foldingRange.h"
#include "textDocument/prepareRename.h"
#include "textDocument/resolveTypeHierarchy.h"
#include "textDocument/callHierarchy.h"
#include "textDocument/selectionRange.h"
#include "extention/jdtls/classFileContents.h"
#include "extention/jdtls/buildWorkspace.h"
#include "extention/jdtls/listOverridableMethods.h"
#include "extention/jdtls/addOverridableMethods.h"
#include "extention/jdtls/checkHashCodeEqualsStatus.h"
#include "extention/jdtls/checkConstructorsStatus.h"
#include "extention/jdtls/checkDelegateMethodsStatus.h"
#include "extention/jdtls/checkToStringStatus.h"
#include "extention/jdtls/executeCommand.h"
#include "extention/jdtls/findLinks.h"
#include "extention/jdtls/generateAccessors.h"
#include "extention/jdtls/generateConstructors.h"
#include "extention/jdtls/generateDelegateMethods.h"
#include "extention/jdtls/generateHashCodeEquals.h"
#include "extention/jdtls/generateToString.h"
#include "extention/jdtls/getMoveDestinations.h"
#include "extention/jdtls/Move.h"
#include "extention/jdtls/organizeImports.h"
#include "general/exit.h"
#include "general/initialized.h"
#include "extention/jdtls/projectConfigurationUpdate.h"
#include "textDocument/did_change.h"
#include "textDocument/did_open.h"
#include "textDocument/did_save.h"
#include "textDocument/publishDiagnostics.h"
#include "textDocument/willSave.h"

#include "workspace/didChangeWorkspaceFolders.h"
#include "workspace/did_change_configuration.h"
#include "workspace/did_change_watched_files.h"
#include "windows/MessageNotify.h"
#include "language/language.h"
#include "client/registerCapability.h"
#include "client/unregisterCapability.h"
#include "LibLsp/JsonRpc/Cancellation.h"
#include "textDocument/didRenameFiles.h"
#include "textDocument/semanticHighlighting.h"
#include "workspace/configuration.h"


void AddStadardResponseJsonRpcMethod(MessageJsonHandler& handler)
{
	
	handler.method2response[td_initialize::request::kMethodInfo] = [](Reader& visitor)
	{
		if(visitor.HasMember("error"))
		 return 	Rsp_Error::ReflectReader(visitor);
		
		return td_initialize::response::ReflectReader(visitor);
	};
	
	handler.method2response[td_shutdown::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);
		return td_shutdown::response::ReflectReader(visitor);
	};
	handler.method2response[td_codeAction::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);

		return td_codeAction::response::ReflectReader(visitor);
	};
	handler.method2response[td_codeLens::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);
		return td_codeLens::response::ReflectReader(visitor);
	};
	handler.method2response[td_completion::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);
		return td_completion::response::ReflectReader(visitor);
	};

	handler.method2response[td_definition::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);
		return td_definition::response::ReflectReader(visitor);
	};
	handler.method2response[td_declaration::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);
		return td_declaration::response::ReflectReader(visitor);
	};
	handler.method2response[td_willSaveWaitUntil::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);
		return td_willSaveWaitUntil::response::ReflectReader(visitor);
	};
	
	handler.method2response[td_highlight::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);
		return td_highlight::response::ReflectReader(visitor);
	};
	
	handler.method2response[td_links::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);
		return td_links::response::ReflectReader(visitor);
	};
	
	handler.method2response[td_linkResolve::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);
		return td_linkResolve::response::ReflectReader(visitor);
	};
	
	handler.method2response[td_symbol::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);
		return td_symbol::response::ReflectReader(visitor);
	};
	
	handler.method2response[td_formatting::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);
		return td_formatting::response::ReflectReader(visitor);
	};

	handler.method2response[td_hover::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);
		return td_hover::response::ReflectReader(visitor);
	
	};
	
	handler.method2response[td_implementation::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);
		return td_implementation::response::ReflectReader(visitor);
	};

	handler.method2response[td_rangeFormatting::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);
		return td_rangeFormatting::response::ReflectReader(visitor);
	};

	handler.method2response[td_references::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);
		return td_references::response::ReflectReader(visitor);
	};
	
	handler.method2response[td_rename::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);
		return td_rename::response::ReflectReader(visitor);
	};


	handler.method2response[td_signatureHelp::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);
		return td_signatureHelp::response::ReflectReader(visitor);
	};

	handler.method2response[td_typeDefinition::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);
		return td_typeDefinition::response::ReflectReader(visitor);
	};

	handler.method2response[wp_executeCommand::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);
		return wp_executeCommand::response::ReflectReader(visitor);
	};

	handler.method2response[wp_symbol::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);
		return wp_symbol::response::ReflectReader(visitor);
	};
	handler.method2response[td_typeHierarchy::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);
		return td_typeHierarchy::response::ReflectReader(visitor);
	};
	handler.method2response[completionItem_resolve::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);
		return completionItem_resolve::response::ReflectReader(visitor);
	};

	handler.method2response[codeLens_resolve::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);
		
		return codeLens_resolve::response::ReflectReader(visitor);
		
	};

	handler.method2response[td_colorPresentation::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);

		return td_colorPresentation::response::ReflectReader(visitor);

	};
	handler.method2response[td_documentColor::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);

		return td_documentColor::response::ReflectReader(visitor);

	};
	handler.method2response[td_foldingRange::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);

		return td_foldingRange::response::ReflectReader(visitor);

	};
	handler.method2response[td_prepareRename::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);

		return td_prepareRename::response::ReflectReader(visitor);

	};
	handler.method2response[typeHierarchy_resolve::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);

		return typeHierarchy_resolve::response::ReflectReader(visitor);

	};

	handler.method2response[td_selectionRange::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);

		return td_selectionRange::response::ReflectReader(visitor);

	};
	handler.method2response[td_didRenameFiles::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);

		return td_didRenameFiles::response::ReflectReader(visitor);

	};
	handler.method2response[td_willRenameFiles::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);

		return td_willRenameFiles::response::ReflectReader(visitor);

	};
	
}


void AddJavaExtentionResponseJsonRpcMethod(MessageJsonHandler& handler)
{
	handler.method2response[java_classFileContents::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);

		return java_classFileContents::response::ReflectReader(visitor);
	};
	handler.method2response[java_buildWorkspace::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);

		return java_buildWorkspace::response::ReflectReader(visitor);
	};
	handler.method2response[java_listOverridableMethods::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);

		return java_listOverridableMethods::response::ReflectReader(visitor);
	};
	handler.method2response[java_listOverridableMethods::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);

		return java_listOverridableMethods::response::ReflectReader(visitor);
	};

	handler.method2response[java_checkHashCodeEqualsStatus::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);

		return java_checkHashCodeEqualsStatus::response::ReflectReader(visitor);
	};


	handler.method2response[java_addOverridableMethods::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);

		return java_addOverridableMethods::response::ReflectReader(visitor);
	};

	handler.method2response[java_checkConstructorsStatus::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);

		return java_checkConstructorsStatus::response::ReflectReader(visitor);
	};


	handler.method2response[java_checkDelegateMethodsStatus::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);

		return java_checkDelegateMethodsStatus::response::ReflectReader(visitor);
	};
	handler.method2response[java_checkToStringStatus::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);

		return java_checkToStringStatus::response::ReflectReader(visitor);
	};


	handler.method2response[java_generateAccessors::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);

		return java_generateAccessors::response::ReflectReader(visitor);
	};
	handler.method2response[java_generateConstructors::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);

		return java_generateConstructors::response::ReflectReader(visitor);
	};
	handler.method2response[java_generateDelegateMethods::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);

		return java_generateDelegateMethods::response::ReflectReader(visitor);
	};

	handler.method2response[java_generateHashCodeEquals::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);

		return java_generateHashCodeEquals::response::ReflectReader(visitor);
	};
	handler.method2response[java_generateToString::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);

		return java_generateToString::response::ReflectReader(visitor);
	};

	handler.method2response[java_generateToString::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);

		return java_generateToString::response::ReflectReader(visitor);
	};

	handler.method2response[java_getMoveDestinations::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);

		return java_getMoveDestinations::response::ReflectReader(visitor);
	};

	handler.method2response[java_getRefactorEdit::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);

		return java_getRefactorEdit::response::ReflectReader(visitor);
	};

	handler.method2response[java_move::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);

		return java_move::response ::ReflectReader(visitor);
	};

	handler.method2response[java_organizeImports::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);

		return java_organizeImports::response::ReflectReader(visitor);
	};

	handler.method2response[java_resolveUnimplementedAccessors::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);

		return java_resolveUnimplementedAccessors::response::ReflectReader(visitor);
	};

	handler.method2response[java_searchSymbols::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);

		return java_searchSymbols::response::ReflectReader(visitor);
	};

	handler.method2request[WorkspaceConfiguration::request::kMethodInfo] = [](Reader& visitor)
	{
		return WorkspaceConfiguration::request::ReflectReader(visitor);
	};
	handler.method2request[WorkspaceFolders::request::kMethodInfo] = [](Reader& visitor)
	{
		return WorkspaceFolders::request::ReflectReader(visitor);
	};
	
}

void AddNotifyJsonRpcMethod(MessageJsonHandler& handler)
{

	handler.method2notification[Notify_Exit::notify::kMethodInfo] = [](Reader& visitor)
	{
		return Notify_Exit::notify::ReflectReader(visitor);
	};
	handler.method2notification[Notify_InitializedNotification::notify::kMethodInfo] = [](Reader& visitor)
	{
		return Notify_InitializedNotification::notify::ReflectReader(visitor);
	};

	handler.method2notification[java_projectConfigurationUpdate::notify::kMethodInfo] = [](Reader& visitor)
	{
		return java_projectConfigurationUpdate::notify::ReflectReader(visitor);
	};

	handler.method2notification[Notify_TextDocumentDidChange::notify::kMethodInfo] = [](Reader& visitor)
	{
		return Notify_TextDocumentDidChange::notify::ReflectReader(visitor);
	};

	handler.method2notification[Notify_TextDocumentDidClose::notify::kMethodInfo] = [](Reader& visitor)
	{
		return Notify_TextDocumentDidClose::notify::ReflectReader(visitor);
	};


	handler.method2notification[Notify_TextDocumentDidOpen::notify::kMethodInfo] = [](Reader& visitor)
	{
		return Notify_TextDocumentDidOpen::notify::ReflectReader(visitor);
	};

	handler.method2notification[Notify_TextDocumentDidSave::notify::kMethodInfo] = [](Reader& visitor)
	{
		return Notify_TextDocumentDidSave::notify::ReflectReader(visitor);
	};

	handler.method2notification[Notify_TextDocumentPublishDiagnostics::notify::kMethodInfo] = [](Reader& visitor)
	{
		return Notify_TextDocumentPublishDiagnostics::notify::ReflectReader(visitor);
	};
	handler.method2notification[Notify_semanticHighlighting::notify::kMethodInfo] = [](Reader& visitor)
	{
		return Notify_semanticHighlighting::notify::ReflectReader(visitor);
	};
	handler.method2notification[td_willSave::notify::kMethodInfo] = [](Reader& visitor)
	{
		return td_willSave::notify::ReflectReader(visitor);
	};

	handler.method2notification[Notify_LogMessage::notify::kMethodInfo] = [](Reader& visitor)
	{
		return Notify_LogMessage::notify::ReflectReader(visitor);
	};
	handler.method2notification[Notify_ShowMessage::notify::kMethodInfo] = [](Reader& visitor)
	{
		return Notify_ShowMessage::notify::ReflectReader(visitor);
	};
	handler.method2notification[Notify_WorkspaceDidChangeWorkspaceFolders::notify::kMethodInfo] = [](Reader& visitor)
	{
		return Notify_WorkspaceDidChangeWorkspaceFolders::notify::ReflectReader(visitor);
	};

	handler.method2notification[Notify_WorkspaceDidChangeConfiguration::notify::kMethodInfo] = [](Reader& visitor)
	{
		return Notify_WorkspaceDidChangeConfiguration::notify::ReflectReader(visitor);
	};


	handler.method2notification[Notify_WorkspaceDidChangeWatchedFiles::notify::kMethodInfo] = [](Reader& visitor)
	{
		return Notify_WorkspaceDidChangeWatchedFiles::notify::ReflectReader(visitor);
	};

	handler.method2notification[Notify_sendNotification::notify::kMethodInfo] = [](Reader& visitor)
	{
		return Notify_sendNotification::notify::ReflectReader(visitor);
	};
	handler.method2notification[lang_status::notify::kMethodInfo] = [](Reader& visitor)
	{
		return lang_status::notify::ReflectReader(visitor);
	};
	handler.method2notification[lang_actionableNotification::notify::kMethodInfo] = [](Reader& visitor)
	{
		return lang_actionableNotification::notify::ReflectReader(visitor);
	};
	handler.method2notification[lang_progressReport::notify::kMethodInfo] = [](Reader& visitor)
	{
		return lang_progressReport::notify::ReflectReader(visitor);
	};
	handler.method2notification[lang_eventNotification::notify::kMethodInfo] = [](Reader& visitor)
	{
		return lang_eventNotification::notify::ReflectReader(visitor);
	};
}

void AddRequstJsonRpcMethod(MessageJsonHandler& handler)
{
	handler.method2request[Req_ClientRegisterCapability::request::kMethodInfo]= [](Reader& visitor)
	{

		return Req_ClientRegisterCapability::request::ReflectReader(visitor);
	};
	handler.method2request[Req_ClientUnregisterCapability::request::kMethodInfo] = [](Reader& visitor)
	{

		return Req_ClientUnregisterCapability::request::ReflectReader(visitor);
	};
}

void AddStandardRequestJsonRpcMethod(MessageJsonHandler& handler)
{

	handler.method2request[td_initialize::request::kMethodInfo] = [](Reader& visitor)
	{
	
		return td_initialize::request::ReflectReader(visitor);
	};
	handler.method2request[td_shutdown::request::kMethodInfo] = [](Reader& visitor)
	{

		return td_shutdown::request::ReflectReader(visitor);
	};
	handler.method2request[td_codeAction::request::kMethodInfo] = [](Reader& visitor)
	{


		return td_codeAction::request::ReflectReader(visitor);
	};
	handler.method2request[td_codeLens::request::kMethodInfo] = [](Reader& visitor)
	{

		return td_codeLens::request::ReflectReader(visitor);
	};
	handler.method2request[td_completion::request::kMethodInfo] = [](Reader& visitor)
	{

		return td_completion::request::ReflectReader(visitor);
	};

	handler.method2request[td_definition::request::kMethodInfo] = [](Reader& visitor)
	{

		return td_definition::request::ReflectReader(visitor);
	};
	handler.method2request[td_declaration::request::kMethodInfo] = [](Reader& visitor)
	{

		return td_declaration::request::ReflectReader(visitor);
	};
	handler.method2request[td_willSaveWaitUntil::request::kMethodInfo] = [](Reader& visitor)
	{
		if (visitor.HasMember("error"))
			return 	Rsp_Error::ReflectReader(visitor);
		return td_willSaveWaitUntil::request::ReflectReader(visitor);
	};

	handler.method2request[td_highlight::request::kMethodInfo] = [](Reader& visitor)
	{

		return td_highlight::request::ReflectReader(visitor);
	};

	handler.method2request[td_links::request::kMethodInfo] = [](Reader& visitor)
	{

		return td_links::request::ReflectReader(visitor);
	};

	handler.method2request[td_linkResolve::request::kMethodInfo] = [](Reader& visitor)
	{
	
		return td_linkResolve::request::ReflectReader(visitor);
	};

	handler.method2request[td_symbol::request::kMethodInfo] = [](Reader& visitor)
	{

		return td_symbol::request::ReflectReader(visitor);
	};

	handler.method2request[td_formatting::request::kMethodInfo] = [](Reader& visitor)
	{

		return td_formatting::request::ReflectReader(visitor);
	};

	handler.method2request[td_hover::request::kMethodInfo] = [](Reader& visitor)
	{
		return td_hover::request::ReflectReader(visitor);
	};

	handler.method2request[td_implementation::request::kMethodInfo] = [](Reader& visitor)
	{
	
		return td_implementation::request::ReflectReader(visitor);
	};
	
	handler.method2request[td_didRenameFiles::request::kMethodInfo] = [](Reader& visitor)
	{

		return td_didRenameFiles::request::ReflectReader(visitor);
	};
	
	handler.method2request[td_willRenameFiles::request::kMethodInfo] = [](Reader& visitor)
	{
		return td_willRenameFiles::request::ReflectReader(visitor);
	};
}


lsp::ProtocolJsonHandler::ProtocolJsonHandler()
{
	AddStadardResponseJsonRpcMethod(*this);
	AddJavaExtentionResponseJsonRpcMethod(*this);
	AddNotifyJsonRpcMethod(*this);
	AddStandardRequestJsonRpcMethod(*this);
	AddRequstJsonRpcMethod(*this);
}