keli-ui 0.3.7 → 0.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2295 @@
1
+ import * as e from "monaco-editor";
2
+ //#region src/components/FormComponent/FormCodeEditor/language/java.ts
3
+ var t = {
4
+ wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
5
+ comments: {
6
+ lineComment: "//",
7
+ blockComment: ["/*", "*/"]
8
+ },
9
+ brackets: [
10
+ ["{", "}"],
11
+ ["[", "]"],
12
+ ["(", ")"]
13
+ ],
14
+ autoClosingPairs: [
15
+ {
16
+ open: "{",
17
+ close: "}"
18
+ },
19
+ {
20
+ open: "[",
21
+ close: "]"
22
+ },
23
+ {
24
+ open: "(",
25
+ close: ")"
26
+ },
27
+ {
28
+ open: "\"",
29
+ close: "\""
30
+ },
31
+ {
32
+ open: "'",
33
+ close: "'"
34
+ }
35
+ ],
36
+ surroundingPairs: [
37
+ {
38
+ open: "{",
39
+ close: "}"
40
+ },
41
+ {
42
+ open: "[",
43
+ close: "]"
44
+ },
45
+ {
46
+ open: "(",
47
+ close: ")"
48
+ },
49
+ {
50
+ open: "\"",
51
+ close: "\""
52
+ },
53
+ {
54
+ open: "'",
55
+ close: "'"
56
+ },
57
+ {
58
+ open: "<",
59
+ close: ">"
60
+ }
61
+ ],
62
+ folding: { markers: {
63
+ start: /* @__PURE__ */ RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:<editor-fold\\b))"),
64
+ end: /* @__PURE__ */ RegExp("^\\s*//\\s*(?:(?:#?endregion\\b)|(?:</editor-fold>))")
65
+ } }
66
+ }, n = {
67
+ defaultToken: "",
68
+ tokenPostfix: ".java",
69
+ keywords: /* @__PURE__ */ "abstract.continue.for.new.switch.assert.default.goto.package.synchronized.boolean.do.if.private.this.break.double.implements.protected.throw.byte.else.import.public.throws.case.enum.instanceof.return.transient.catch.extends.int.short.try.char.final.interface.static.void.class.finally.long.strictfp.volatile.const.float.native.super.while.true.false.yield.record.sealed.non-sealed.permits".split("."),
70
+ operators: /* @__PURE__ */ "=.>.<.!.~.?.:.==.<=.>=.!=.&&.||.++.--.+.-.*./.&.|.^.%.<<.>>.>>>.+=.-=.*=./=.&=.|=.^=.%=.<<=.>>=.>>>=".split("."),
71
+ typeKeywords: /* @__PURE__ */ "String.Integer.Long.Double.Float.Boolean.Character.Byte.Short.Object.Class.System.Math.StringBuilder.StringBuffer.List.ArrayList.LinkedList.Map.HashMap.TreeMap.LinkedHashMap.Set.HashSet.TreeSet.LinkedHashSet.Queue.Deque.Stack.Collection.Collections.Arrays.Optional.Stream.Collectors.Exception.RuntimeException.Error.Throwable.Thread.Runnable.Callable.Future.CompletableFuture.Date.LocalDate.LocalTime.LocalDateTime.Instant.Duration.File.Path.Files.InputStream.OutputStream.Reader.Writer.Pattern.Matcher.Scanner.Random.UUID.BigDecimal.BigInteger.AtomicInteger.AtomicLong.Comparator.Comparable.Iterator.Iterable.Function.Consumer.Supplier.Predicate.BiFunction".split("."),
72
+ symbols: /[=><!~?:&|+\-*\/\^%]+/,
73
+ escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
74
+ digits: /\d+(_+\d+)*/,
75
+ octaldigits: /[0-7]+(_+[0-7]+)*/,
76
+ binarydigits: /[0-1]+(_+[0-1]+)*/,
77
+ hexdigits: /[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,
78
+ tokenizer: {
79
+ root: [
80
+ ["non-sealed", "keyword.non-sealed"],
81
+ [/([a-zA-Z_$][\w$]*)(\s*)(\()/, [
82
+ { cases: {
83
+ "@keywords": "keyword.$0",
84
+ "@typeKeywords": "type",
85
+ "@default": "function"
86
+ } },
87
+ "",
88
+ "@brackets"
89
+ ]],
90
+ [/[A-Z][\w$]*/, { cases: {
91
+ "@keywords": "keyword.$0",
92
+ "@typeKeywords": "type",
93
+ "@default": "type"
94
+ } }],
95
+ [/[a-z_$][\w$]*/, { cases: {
96
+ "@keywords": { token: "keyword.$0" },
97
+ "@default": "identifier"
98
+ } }],
99
+ { include: "@whitespace" },
100
+ [/[{}()\[\]]/, "@brackets"],
101
+ [/[<>](?!@symbols)/, "@brackets"],
102
+ [/@symbols/, { cases: {
103
+ "@operators": "delimiter",
104
+ "@default": ""
105
+ } }],
106
+ [/@\s*[a-zA-Z_\$][\w\$]*/, "annotation"],
107
+ [/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/, "number.float"],
108
+ [/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/, "number.float"],
109
+ [/0[xX](@hexdigits)[Ll]?/, "number.hex"],
110
+ [/0(@octaldigits)[Ll]?/, "number.octal"],
111
+ [/0[bB](@binarydigits)[Ll]?/, "number.binary"],
112
+ [/(@digits)[fFdD]/, "number.float"],
113
+ [/(@digits)[lL]?/, "number"],
114
+ [/[;,.]/, "delimiter"],
115
+ [/"([^"\\]|\\.)*$/, "string.invalid"],
116
+ [
117
+ /"""/,
118
+ "string",
119
+ "@multistring"
120
+ ],
121
+ [
122
+ /"/,
123
+ "string",
124
+ "@string"
125
+ ],
126
+ [/'[^\\']'/, "string"],
127
+ [/(')(@escapes)(')/, [
128
+ "string",
129
+ "string.escape",
130
+ "string"
131
+ ]],
132
+ [/'/, "string.invalid"]
133
+ ],
134
+ whitespace: [
135
+ [/[ \t\r\n]+/, ""],
136
+ [
137
+ /\/\*\*(?!\/)/,
138
+ "comment.doc",
139
+ "@javadoc"
140
+ ],
141
+ [
142
+ /\/\*/,
143
+ "comment",
144
+ "@comment"
145
+ ],
146
+ [/\/\/.*$/, "comment"]
147
+ ],
148
+ comment: [
149
+ [/[^\/*]+/, "comment"],
150
+ [
151
+ /\*\//,
152
+ "comment",
153
+ "@pop"
154
+ ],
155
+ [/[\/*]/, "comment"]
156
+ ],
157
+ javadoc: [
158
+ [/[^\/*]+/, "comment.doc"],
159
+ [/\/\*/, "comment.doc.invalid"],
160
+ [
161
+ /\*\//,
162
+ "comment.doc",
163
+ "@pop"
164
+ ],
165
+ [/[\/*]/, "comment.doc"]
166
+ ],
167
+ string: [
168
+ [/[^\\"]+/, "string"],
169
+ [/@escapes/, "string.escape"],
170
+ [/\\./, "string.escape.invalid"],
171
+ [
172
+ /"/,
173
+ "string",
174
+ "@pop"
175
+ ]
176
+ ],
177
+ multistring: [
178
+ [/[^\\"]+/, "string"],
179
+ [/@escapes/, "string.escape"],
180
+ [/\\./, "string.escape.invalid"],
181
+ [
182
+ /"""/,
183
+ "string",
184
+ "@pop"
185
+ ],
186
+ [/./, "string"]
187
+ ]
188
+ }
189
+ };
190
+ function r() {
191
+ e.editor.defineTheme("java-dark", {
192
+ base: "vs-dark",
193
+ inherit: !0,
194
+ rules: [
195
+ {
196
+ token: "keyword",
197
+ foreground: "569CD6"
198
+ },
199
+ {
200
+ token: "keyword.package",
201
+ foreground: "C586C0"
202
+ },
203
+ {
204
+ token: "keyword.import",
205
+ foreground: "C586C0"
206
+ },
207
+ {
208
+ token: "keyword.class",
209
+ foreground: "569CD6"
210
+ },
211
+ {
212
+ token: "keyword.interface",
213
+ foreground: "569CD6"
214
+ },
215
+ {
216
+ token: "keyword.public",
217
+ foreground: "569CD6"
218
+ },
219
+ {
220
+ token: "keyword.private",
221
+ foreground: "569CD6"
222
+ },
223
+ {
224
+ token: "keyword.protected",
225
+ foreground: "569CD6"
226
+ },
227
+ {
228
+ token: "keyword.static",
229
+ foreground: "569CD6"
230
+ },
231
+ {
232
+ token: "keyword.final",
233
+ foreground: "569CD6"
234
+ },
235
+ {
236
+ token: "keyword.void",
237
+ foreground: "569CD6"
238
+ },
239
+ {
240
+ token: "keyword.return",
241
+ foreground: "C586C0"
242
+ },
243
+ {
244
+ token: "keyword.new",
245
+ foreground: "569CD6"
246
+ },
247
+ {
248
+ token: "keyword.if",
249
+ foreground: "C586C0"
250
+ },
251
+ {
252
+ token: "keyword.else",
253
+ foreground: "C586C0"
254
+ },
255
+ {
256
+ token: "keyword.for",
257
+ foreground: "C586C0"
258
+ },
259
+ {
260
+ token: "keyword.while",
261
+ foreground: "C586C0"
262
+ },
263
+ {
264
+ token: "keyword.try",
265
+ foreground: "C586C0"
266
+ },
267
+ {
268
+ token: "keyword.catch",
269
+ foreground: "C586C0"
270
+ },
271
+ {
272
+ token: "keyword.throw",
273
+ foreground: "C586C0"
274
+ },
275
+ {
276
+ token: "keyword.throws",
277
+ foreground: "C586C0"
278
+ },
279
+ {
280
+ token: "type",
281
+ foreground: "4EC9B0"
282
+ },
283
+ {
284
+ token: "function",
285
+ foreground: "DCDCAA"
286
+ },
287
+ {
288
+ token: "annotation",
289
+ foreground: "D7BA7D"
290
+ },
291
+ {
292
+ token: "string",
293
+ foreground: "CE9178"
294
+ },
295
+ {
296
+ token: "number",
297
+ foreground: "B5CEA8"
298
+ },
299
+ {
300
+ token: "comment",
301
+ foreground: "6A9955"
302
+ },
303
+ {
304
+ token: "comment.doc",
305
+ foreground: "6A9955"
306
+ },
307
+ {
308
+ token: "identifier",
309
+ foreground: "9CDCFE"
310
+ },
311
+ {
312
+ token: "delimiter",
313
+ foreground: "D4D4D4"
314
+ }
315
+ ],
316
+ colors: {}
317
+ }), e.editor.defineTheme("java-light", {
318
+ base: "vs",
319
+ inherit: !0,
320
+ rules: [
321
+ {
322
+ token: "keyword",
323
+ foreground: "0000FF"
324
+ },
325
+ {
326
+ token: "keyword.package",
327
+ foreground: "AF00DB"
328
+ },
329
+ {
330
+ token: "keyword.import",
331
+ foreground: "AF00DB"
332
+ },
333
+ {
334
+ token: "keyword.return",
335
+ foreground: "AF00DB"
336
+ },
337
+ {
338
+ token: "keyword.if",
339
+ foreground: "AF00DB"
340
+ },
341
+ {
342
+ token: "keyword.else",
343
+ foreground: "AF00DB"
344
+ },
345
+ {
346
+ token: "keyword.for",
347
+ foreground: "AF00DB"
348
+ },
349
+ {
350
+ token: "keyword.while",
351
+ foreground: "AF00DB"
352
+ },
353
+ {
354
+ token: "keyword.try",
355
+ foreground: "AF00DB"
356
+ },
357
+ {
358
+ token: "keyword.catch",
359
+ foreground: "AF00DB"
360
+ },
361
+ {
362
+ token: "keyword.throw",
363
+ foreground: "AF00DB"
364
+ },
365
+ {
366
+ token: "type",
367
+ foreground: "267F99"
368
+ },
369
+ {
370
+ token: "function",
371
+ foreground: "795E26"
372
+ },
373
+ {
374
+ token: "annotation",
375
+ foreground: "808000"
376
+ },
377
+ {
378
+ token: "string",
379
+ foreground: "A31515"
380
+ },
381
+ {
382
+ token: "number",
383
+ foreground: "098658"
384
+ },
385
+ {
386
+ token: "comment",
387
+ foreground: "008000"
388
+ },
389
+ {
390
+ token: "identifier",
391
+ foreground: "001080"
392
+ }
393
+ ],
394
+ colors: {}
395
+ });
396
+ }
397
+ var i = !1;
398
+ function a() {
399
+ i || (i = !0, e.languages.registerCompletionItemProvider("java", {
400
+ triggerCharacters: [
401
+ ".",
402
+ "@",
403
+ " "
404
+ ],
405
+ provideCompletionItems: (t, n) => {
406
+ let r = t.getWordUntilPosition(n), i = {
407
+ startLineNumber: n.lineNumber,
408
+ endLineNumber: n.lineNumber,
409
+ startColumn: r.startColumn,
410
+ endColumn: r.endColumn
411
+ }, a = t.getLineContent(n.lineNumber).substring(0, n.column - 1), o = r.word.toLowerCase(), s = [];
412
+ if (o.length >= 1 && [
413
+ [
414
+ "public",
415
+ "公共访问",
416
+ "public "
417
+ ],
418
+ [
419
+ "private",
420
+ "私有访问",
421
+ "private "
422
+ ],
423
+ [
424
+ "protected",
425
+ "受保护访问",
426
+ "protected "
427
+ ],
428
+ [
429
+ "static",
430
+ "静态",
431
+ "static "
432
+ ],
433
+ [
434
+ "final",
435
+ "最终",
436
+ "final "
437
+ ],
438
+ [
439
+ "abstract",
440
+ "抽象",
441
+ "abstract "
442
+ ],
443
+ [
444
+ "native",
445
+ "本地方法",
446
+ "native "
447
+ ],
448
+ [
449
+ "strictfp",
450
+ "严格浮点",
451
+ "strictfp "
452
+ ],
453
+ [
454
+ "synchronized",
455
+ "同步",
456
+ "synchronized "
457
+ ],
458
+ [
459
+ "volatile",
460
+ "易变",
461
+ "volatile "
462
+ ],
463
+ [
464
+ "transient",
465
+ "瞬态",
466
+ "transient "
467
+ ],
468
+ [
469
+ "class",
470
+ "类",
471
+ "class $1 {\n $2\n}"
472
+ ],
473
+ [
474
+ "interface",
475
+ "接口",
476
+ "interface $1 {\n $2\n}"
477
+ ],
478
+ [
479
+ "enum",
480
+ "枚举",
481
+ "enum $1 {\n $2\n}"
482
+ ],
483
+ [
484
+ "record",
485
+ "记录类",
486
+ "record $1($2) {}"
487
+ ],
488
+ [
489
+ "@interface",
490
+ "注解定义",
491
+ "@interface $1 {\n $2\n}"
492
+ ],
493
+ [
494
+ "extends",
495
+ "继承",
496
+ "extends "
497
+ ],
498
+ [
499
+ "implements",
500
+ "实现",
501
+ "implements "
502
+ ],
503
+ [
504
+ "permits",
505
+ "允许",
506
+ "permits "
507
+ ],
508
+ [
509
+ "sealed",
510
+ "密封类",
511
+ "sealed "
512
+ ],
513
+ [
514
+ "non-sealed",
515
+ "非密封",
516
+ "non-sealed "
517
+ ],
518
+ [
519
+ "package",
520
+ "包声明",
521
+ "package $1;"
522
+ ],
523
+ [
524
+ "import",
525
+ "导入",
526
+ "import $1;"
527
+ ],
528
+ [
529
+ "import static",
530
+ "静态导入",
531
+ "import static $1;"
532
+ ],
533
+ [
534
+ "if",
535
+ "条件判断",
536
+ "if ($1) {\n $2\n}"
537
+ ],
538
+ [
539
+ "else",
540
+ "否则",
541
+ "else {\n $1\n}"
542
+ ],
543
+ [
544
+ "else if",
545
+ "否则如果",
546
+ "else if ($1) {\n $2\n}"
547
+ ],
548
+ [
549
+ "switch",
550
+ "switch语句",
551
+ "switch ($1) {\n case $2 -> $3;\n default -> $4;\n}"
552
+ ],
553
+ [
554
+ "case",
555
+ "case分支",
556
+ "case $1 -> $2;"
557
+ ],
558
+ [
559
+ "default",
560
+ "默认",
561
+ "default -> $1;"
562
+ ],
563
+ [
564
+ "for",
565
+ "for循环",
566
+ "for (int i = 0; i < $1; i++) {\n $2\n}"
567
+ ],
568
+ [
569
+ "while",
570
+ "while循环",
571
+ "while ($1) {\n $2\n}"
572
+ ],
573
+ [
574
+ "do",
575
+ "do-while",
576
+ "do {\n $1\n} while ($2);"
577
+ ],
578
+ [
579
+ "break",
580
+ "跳出循环",
581
+ "break;"
582
+ ],
583
+ [
584
+ "continue",
585
+ "继续循环",
586
+ "continue;"
587
+ ],
588
+ [
589
+ "return",
590
+ "返回",
591
+ "return $1;"
592
+ ],
593
+ [
594
+ "yield",
595
+ "yield返回",
596
+ "yield $1;"
597
+ ],
598
+ [
599
+ "try",
600
+ "try块",
601
+ "try {\n $1\n} catch (Exception e) {\n $2\n}"
602
+ ],
603
+ [
604
+ "catch",
605
+ "catch块",
606
+ "catch ($1 e) {\n $2\n}"
607
+ ],
608
+ [
609
+ "finally",
610
+ "finally块",
611
+ "finally {\n $1\n}"
612
+ ],
613
+ [
614
+ "throw",
615
+ "抛出异常",
616
+ "throw new $1(\"$2\");"
617
+ ],
618
+ [
619
+ "throws",
620
+ "声明异常",
621
+ "throws $1"
622
+ ],
623
+ [
624
+ "new",
625
+ "创建对象",
626
+ "new $1($2)"
627
+ ],
628
+ [
629
+ "this",
630
+ "当前对象",
631
+ "this"
632
+ ],
633
+ [
634
+ "super",
635
+ "父类引用",
636
+ "super"
637
+ ],
638
+ [
639
+ "instanceof",
640
+ "类型检查",
641
+ "instanceof $1"
642
+ ],
643
+ [
644
+ "var",
645
+ "类型推断",
646
+ "var $1 = $2;"
647
+ ],
648
+ [
649
+ "assert",
650
+ "断言",
651
+ "assert $1 : \"$2\";"
652
+ ],
653
+ [
654
+ "null",
655
+ "空值",
656
+ "null"
657
+ ],
658
+ [
659
+ "true",
660
+ "真",
661
+ "true"
662
+ ],
663
+ [
664
+ "false",
665
+ "假",
666
+ "false"
667
+ ],
668
+ [
669
+ "void",
670
+ "无返回值",
671
+ "void"
672
+ ],
673
+ [
674
+ "boolean",
675
+ "布尔型",
676
+ "boolean"
677
+ ],
678
+ [
679
+ "byte",
680
+ "字节型",
681
+ "byte"
682
+ ],
683
+ [
684
+ "short",
685
+ "短整型",
686
+ "short"
687
+ ],
688
+ [
689
+ "int",
690
+ "整型",
691
+ "int"
692
+ ],
693
+ [
694
+ "long",
695
+ "长整型",
696
+ "long"
697
+ ],
698
+ [
699
+ "float",
700
+ "单精度浮点",
701
+ "float"
702
+ ],
703
+ [
704
+ "double",
705
+ "双精度浮点",
706
+ "double"
707
+ ],
708
+ [
709
+ "char",
710
+ "字符型",
711
+ "char"
712
+ ],
713
+ [
714
+ "Boolean",
715
+ "布尔包装类",
716
+ "Boolean"
717
+ ],
718
+ [
719
+ "Byte",
720
+ "字节包装类",
721
+ "Byte"
722
+ ],
723
+ [
724
+ "Short",
725
+ "短整型包装类",
726
+ "Short"
727
+ ],
728
+ [
729
+ "Integer",
730
+ "整型包装类",
731
+ "Integer"
732
+ ],
733
+ [
734
+ "Long",
735
+ "长整型包装类",
736
+ "Long"
737
+ ],
738
+ [
739
+ "Float",
740
+ "单精度包装类",
741
+ "Float"
742
+ ],
743
+ [
744
+ "Double",
745
+ "双精度包装类",
746
+ "Double"
747
+ ],
748
+ [
749
+ "Character",
750
+ "字符包装类",
751
+ "Character"
752
+ ],
753
+ [
754
+ "Number",
755
+ "数字基类",
756
+ "Number"
757
+ ],
758
+ [
759
+ "String",
760
+ "字符串",
761
+ "String"
762
+ ],
763
+ [
764
+ "StringBuilder",
765
+ "字符串构建器",
766
+ "StringBuilder"
767
+ ],
768
+ [
769
+ "StringBuffer",
770
+ "线程安全字符串",
771
+ "StringBuffer"
772
+ ],
773
+ [
774
+ "Object",
775
+ "对象基类",
776
+ "Object"
777
+ ],
778
+ [
779
+ "Class",
780
+ "类对象",
781
+ "Class<$1>"
782
+ ],
783
+ [
784
+ "System",
785
+ "系统类",
786
+ "System"
787
+ ],
788
+ [
789
+ "Math",
790
+ "数学类",
791
+ "Math"
792
+ ],
793
+ [
794
+ "Arrays",
795
+ "数组工具",
796
+ "Arrays"
797
+ ],
798
+ [
799
+ "Objects",
800
+ "对象工具",
801
+ "Objects"
802
+ ],
803
+ [
804
+ "Collections",
805
+ "集合工具",
806
+ "Collections"
807
+ ],
808
+ [
809
+ "List",
810
+ "列表接口",
811
+ "List<$1>"
812
+ ],
813
+ [
814
+ "ArrayList",
815
+ "数组列表",
816
+ "new ArrayList<$1>()"
817
+ ],
818
+ [
819
+ "LinkedList",
820
+ "链表",
821
+ "new LinkedList<$1>()"
822
+ ],
823
+ [
824
+ "Set",
825
+ "集合接口",
826
+ "Set<$1>"
827
+ ],
828
+ [
829
+ "HashSet",
830
+ "哈希集合",
831
+ "new HashSet<$1>()"
832
+ ],
833
+ [
834
+ "TreeSet",
835
+ "树集合",
836
+ "new TreeSet<$1>()"
837
+ ],
838
+ [
839
+ "LinkedHashSet",
840
+ "有序哈希集合",
841
+ "new LinkedHashSet<$1>()"
842
+ ],
843
+ [
844
+ "Map",
845
+ "映射接口",
846
+ "Map<$1, $2>"
847
+ ],
848
+ [
849
+ "HashMap",
850
+ "哈希映射",
851
+ "new HashMap<$1, $2>()"
852
+ ],
853
+ [
854
+ "TreeMap",
855
+ "树映射",
856
+ "new TreeMap<$1, $2>()"
857
+ ],
858
+ [
859
+ "LinkedHashMap",
860
+ "有序哈希映射",
861
+ "new LinkedHashMap<$1, $2>()"
862
+ ],
863
+ [
864
+ "ConcurrentHashMap",
865
+ "并发哈希映射",
866
+ "new ConcurrentHashMap<$1, $2>()"
867
+ ],
868
+ [
869
+ "Queue",
870
+ "队列接口",
871
+ "Queue<$1>"
872
+ ],
873
+ [
874
+ "Deque",
875
+ "双端队列",
876
+ "Deque<$1>"
877
+ ],
878
+ [
879
+ "Stack",
880
+ "栈",
881
+ "new Stack<$1>()"
882
+ ],
883
+ [
884
+ "Vector",
885
+ "向量",
886
+ "new Vector<$1>()"
887
+ ],
888
+ [
889
+ "Collection",
890
+ "集合接口",
891
+ "Collection<$1>"
892
+ ],
893
+ [
894
+ "Iterable",
895
+ "可迭代接口",
896
+ "Iterable<$1>"
897
+ ],
898
+ [
899
+ "Iterator",
900
+ "迭代器",
901
+ "Iterator<$1>"
902
+ ],
903
+ [
904
+ "Optional",
905
+ "Optional容器",
906
+ "Optional<$1>"
907
+ ],
908
+ [
909
+ "OptionalInt",
910
+ "int的Optional",
911
+ "OptionalInt"
912
+ ],
913
+ [
914
+ "OptionalLong",
915
+ "long的Optional",
916
+ "OptionalLong"
917
+ ],
918
+ [
919
+ "OptionalDouble",
920
+ "double的Optional",
921
+ "OptionalDouble"
922
+ ],
923
+ [
924
+ "Stream",
925
+ "流",
926
+ "Stream<$1>"
927
+ ],
928
+ [
929
+ "IntStream",
930
+ "int流",
931
+ "IntStream"
932
+ ],
933
+ [
934
+ "LongStream",
935
+ "long流",
936
+ "LongStream"
937
+ ],
938
+ [
939
+ "DoubleStream",
940
+ "double流",
941
+ "DoubleStream"
942
+ ],
943
+ [
944
+ "Collectors",
945
+ "收集器",
946
+ "Collectors"
947
+ ],
948
+ [
949
+ "Function",
950
+ "函数接口",
951
+ "Function<$1, $2>"
952
+ ],
953
+ [
954
+ "BiFunction",
955
+ "双参数函数",
956
+ "BiFunction<$1, $2, $3>"
957
+ ],
958
+ [
959
+ "Consumer",
960
+ "消费者接口",
961
+ "Consumer<$1>"
962
+ ],
963
+ [
964
+ "BiConsumer",
965
+ "双参数消费者",
966
+ "BiConsumer<$1, $2>"
967
+ ],
968
+ [
969
+ "Supplier",
970
+ "供应者接口",
971
+ "Supplier<$1>"
972
+ ],
973
+ [
974
+ "Predicate",
975
+ "断言接口",
976
+ "Predicate<$1>"
977
+ ],
978
+ [
979
+ "BiPredicate",
980
+ "双参数断言",
981
+ "BiPredicate<$1, $2>"
982
+ ],
983
+ [
984
+ "UnaryOperator",
985
+ "一元操作符",
986
+ "UnaryOperator<$1>"
987
+ ],
988
+ [
989
+ "BinaryOperator",
990
+ "二元操作符",
991
+ "BinaryOperator<$1>"
992
+ ],
993
+ [
994
+ "Comparator",
995
+ "比较器",
996
+ "Comparator<$1>"
997
+ ],
998
+ [
999
+ "Comparable",
1000
+ "可比较接口",
1001
+ "Comparable<$1>"
1002
+ ],
1003
+ [
1004
+ "Runnable",
1005
+ "可运行接口",
1006
+ "Runnable"
1007
+ ],
1008
+ [
1009
+ "Callable",
1010
+ "可调用接口",
1011
+ "Callable<$1>"
1012
+ ],
1013
+ [
1014
+ "Exception",
1015
+ "异常",
1016
+ "Exception"
1017
+ ],
1018
+ [
1019
+ "RuntimeException",
1020
+ "运行时异常",
1021
+ "RuntimeException"
1022
+ ],
1023
+ [
1024
+ "NullPointerException",
1025
+ "空指针异常",
1026
+ "NullPointerException"
1027
+ ],
1028
+ [
1029
+ "IllegalArgumentException",
1030
+ "非法参数异常",
1031
+ "IllegalArgumentException"
1032
+ ],
1033
+ [
1034
+ "IllegalStateException",
1035
+ "非法状态异常",
1036
+ "IllegalStateException"
1037
+ ],
1038
+ [
1039
+ "IndexOutOfBoundsException",
1040
+ "索引越界异常",
1041
+ "IndexOutOfBoundsException"
1042
+ ],
1043
+ [
1044
+ "IOException",
1045
+ "IO异常",
1046
+ "IOException"
1047
+ ],
1048
+ [
1049
+ "FileNotFoundException",
1050
+ "文件未找到异常",
1051
+ "FileNotFoundException"
1052
+ ],
1053
+ [
1054
+ "SQLException",
1055
+ "SQL异常",
1056
+ "SQLException"
1057
+ ],
1058
+ [
1059
+ "ClassNotFoundException",
1060
+ "类未找到异常",
1061
+ "ClassNotFoundException"
1062
+ ],
1063
+ [
1064
+ "NoSuchMethodException",
1065
+ "方法未找到异常",
1066
+ "NoSuchMethodException"
1067
+ ],
1068
+ [
1069
+ "Error",
1070
+ "错误",
1071
+ "Error"
1072
+ ],
1073
+ [
1074
+ "Throwable",
1075
+ "可抛出",
1076
+ "Throwable"
1077
+ ],
1078
+ [
1079
+ "Thread",
1080
+ "线程",
1081
+ "Thread"
1082
+ ],
1083
+ [
1084
+ "Future",
1085
+ "Future接口",
1086
+ "Future<$1>"
1087
+ ],
1088
+ [
1089
+ "CompletableFuture",
1090
+ "可完成Future",
1091
+ "CompletableFuture<$1>"
1092
+ ],
1093
+ [
1094
+ "ExecutorService",
1095
+ "执行器服务",
1096
+ "ExecutorService"
1097
+ ],
1098
+ [
1099
+ "Executors",
1100
+ "执行器工厂",
1101
+ "Executors"
1102
+ ],
1103
+ [
1104
+ "ThreadPoolExecutor",
1105
+ "线程池执行器",
1106
+ "ThreadPoolExecutor"
1107
+ ],
1108
+ [
1109
+ "CountDownLatch",
1110
+ "倒计时门闩",
1111
+ "CountDownLatch"
1112
+ ],
1113
+ [
1114
+ "CyclicBarrier",
1115
+ "循环屏障",
1116
+ "CyclicBarrier"
1117
+ ],
1118
+ [
1119
+ "Semaphore",
1120
+ "信号量",
1121
+ "Semaphore"
1122
+ ],
1123
+ [
1124
+ "ReentrantLock",
1125
+ "可重入锁",
1126
+ "ReentrantLock"
1127
+ ],
1128
+ [
1129
+ "AtomicInteger",
1130
+ "原子整数",
1131
+ "AtomicInteger"
1132
+ ],
1133
+ [
1134
+ "AtomicLong",
1135
+ "原子长整数",
1136
+ "AtomicLong"
1137
+ ],
1138
+ [
1139
+ "AtomicBoolean",
1140
+ "原子布尔",
1141
+ "AtomicBoolean"
1142
+ ],
1143
+ [
1144
+ "AtomicReference",
1145
+ "原子引用",
1146
+ "AtomicReference<$1>"
1147
+ ],
1148
+ [
1149
+ "Date",
1150
+ "日期(旧)",
1151
+ "Date"
1152
+ ],
1153
+ [
1154
+ "Calendar",
1155
+ "日历(旧)",
1156
+ "Calendar"
1157
+ ],
1158
+ [
1159
+ "LocalDate",
1160
+ "本地日期",
1161
+ "LocalDate"
1162
+ ],
1163
+ [
1164
+ "LocalTime",
1165
+ "本地时间",
1166
+ "LocalTime"
1167
+ ],
1168
+ [
1169
+ "LocalDateTime",
1170
+ "本地日期时间",
1171
+ "LocalDateTime"
1172
+ ],
1173
+ [
1174
+ "ZonedDateTime",
1175
+ "带时区日期时间",
1176
+ "ZonedDateTime"
1177
+ ],
1178
+ [
1179
+ "Instant",
1180
+ "时间戳",
1181
+ "Instant"
1182
+ ],
1183
+ [
1184
+ "Duration",
1185
+ "时间段",
1186
+ "Duration"
1187
+ ],
1188
+ [
1189
+ "Period",
1190
+ "日期段",
1191
+ "Period"
1192
+ ],
1193
+ [
1194
+ "DateTimeFormatter",
1195
+ "日期格式化",
1196
+ "DateTimeFormatter"
1197
+ ],
1198
+ [
1199
+ "File",
1200
+ "文件",
1201
+ "File"
1202
+ ],
1203
+ [
1204
+ "Path",
1205
+ "路径",
1206
+ "Path"
1207
+ ],
1208
+ [
1209
+ "Paths",
1210
+ "路径工具",
1211
+ "Paths"
1212
+ ],
1213
+ [
1214
+ "Files",
1215
+ "文件工具",
1216
+ "Files"
1217
+ ],
1218
+ [
1219
+ "InputStream",
1220
+ "输入流",
1221
+ "InputStream"
1222
+ ],
1223
+ [
1224
+ "OutputStream",
1225
+ "输出流",
1226
+ "OutputStream"
1227
+ ],
1228
+ [
1229
+ "FileInputStream",
1230
+ "文件输入流",
1231
+ "FileInputStream"
1232
+ ],
1233
+ [
1234
+ "FileOutputStream",
1235
+ "文件输出流",
1236
+ "FileOutputStream"
1237
+ ],
1238
+ [
1239
+ "BufferedReader",
1240
+ "缓冲读取器",
1241
+ "BufferedReader"
1242
+ ],
1243
+ [
1244
+ "BufferedWriter",
1245
+ "缓冲写入器",
1246
+ "BufferedWriter"
1247
+ ],
1248
+ [
1249
+ "Reader",
1250
+ "读取器",
1251
+ "Reader"
1252
+ ],
1253
+ [
1254
+ "Writer",
1255
+ "写入器",
1256
+ "Writer"
1257
+ ],
1258
+ [
1259
+ "BigDecimal",
1260
+ "高精度小数",
1261
+ "BigDecimal"
1262
+ ],
1263
+ [
1264
+ "BigInteger",
1265
+ "高精度整数",
1266
+ "BigInteger"
1267
+ ],
1268
+ [
1269
+ "UUID",
1270
+ "UUID",
1271
+ "UUID"
1272
+ ],
1273
+ [
1274
+ "Random",
1275
+ "随机数",
1276
+ "Random"
1277
+ ],
1278
+ [
1279
+ "Pattern",
1280
+ "正则模式",
1281
+ "Pattern"
1282
+ ],
1283
+ [
1284
+ "Matcher",
1285
+ "正则匹配器",
1286
+ "Matcher"
1287
+ ],
1288
+ [
1289
+ "Scanner",
1290
+ "扫描器",
1291
+ "Scanner"
1292
+ ],
1293
+ [
1294
+ "Enum",
1295
+ "枚举基类",
1296
+ "Enum"
1297
+ ],
1298
+ [
1299
+ "Annotation",
1300
+ "注解接口",
1301
+ "Annotation"
1302
+ ],
1303
+ [
1304
+ "Override",
1305
+ "重写注解",
1306
+ "@Override"
1307
+ ],
1308
+ [
1309
+ "Deprecated",
1310
+ "弃用注解",
1311
+ "@Deprecated"
1312
+ ],
1313
+ [
1314
+ "SuppressWarnings",
1315
+ "抑制警告",
1316
+ "@SuppressWarnings(\"$1\")"
1317
+ ]
1318
+ ].filter(([e]) => e.toLowerCase().startsWith(o)).forEach(([t, n, r]) => {
1319
+ s.push({
1320
+ label: t,
1321
+ detail: n,
1322
+ insertText: r,
1323
+ range: i,
1324
+ kind: e.languages.CompletionItemKind.Keyword,
1325
+ insertTextRules: e.languages.CompletionItemInsertTextRule.InsertAsSnippet,
1326
+ sortText: "0" + t
1327
+ });
1328
+ }), a.endsWith("@") || /@\w*$/.test(a)) {
1329
+ let t = [
1330
+ [
1331
+ "@Override",
1332
+ "重写方法",
1333
+ "@Override"
1334
+ ],
1335
+ [
1336
+ "@Deprecated",
1337
+ "已弃用",
1338
+ "@Deprecated"
1339
+ ],
1340
+ [
1341
+ "@SuppressWarnings",
1342
+ "抑制警告",
1343
+ "@SuppressWarnings(\"$1\")"
1344
+ ],
1345
+ [
1346
+ "@FunctionalInterface",
1347
+ "函数式接口",
1348
+ "@FunctionalInterface"
1349
+ ],
1350
+ [
1351
+ "@SafeVarargs",
1352
+ "安全可变参数",
1353
+ "@SafeVarargs"
1354
+ ],
1355
+ [
1356
+ "@Autowired",
1357
+ "Spring自动注入",
1358
+ "@Autowired"
1359
+ ],
1360
+ [
1361
+ "@Component",
1362
+ "Spring组件",
1363
+ "@Component"
1364
+ ],
1365
+ [
1366
+ "@Service",
1367
+ "Spring服务",
1368
+ "@Service"
1369
+ ],
1370
+ [
1371
+ "@Repository",
1372
+ "Spring仓库",
1373
+ "@Repository"
1374
+ ],
1375
+ [
1376
+ "@Controller",
1377
+ "Spring控制器",
1378
+ "@Controller"
1379
+ ],
1380
+ [
1381
+ "@RestController",
1382
+ "REST控制器",
1383
+ "@RestController"
1384
+ ],
1385
+ [
1386
+ "@RequestMapping",
1387
+ "请求映射",
1388
+ "@RequestMapping(\"$1\")"
1389
+ ],
1390
+ [
1391
+ "@GetMapping",
1392
+ "GET请求",
1393
+ "@GetMapping(\"$1\")"
1394
+ ],
1395
+ [
1396
+ "@PostMapping",
1397
+ "POST请求",
1398
+ "@PostMapping(\"$1\")"
1399
+ ],
1400
+ [
1401
+ "@PutMapping",
1402
+ "PUT请求",
1403
+ "@PutMapping(\"$1\")"
1404
+ ],
1405
+ [
1406
+ "@DeleteMapping",
1407
+ "DELETE请求",
1408
+ "@DeleteMapping(\"$1\")"
1409
+ ],
1410
+ [
1411
+ "@PathVariable",
1412
+ "路径变量",
1413
+ "@PathVariable"
1414
+ ],
1415
+ [
1416
+ "@RequestParam",
1417
+ "请求参数",
1418
+ "@RequestParam"
1419
+ ],
1420
+ [
1421
+ "@RequestBody",
1422
+ "请求体",
1423
+ "@RequestBody"
1424
+ ],
1425
+ [
1426
+ "@ResponseBody",
1427
+ "响应体",
1428
+ "@ResponseBody"
1429
+ ],
1430
+ [
1431
+ "@Bean",
1432
+ "Spring Bean",
1433
+ "@Bean"
1434
+ ],
1435
+ [
1436
+ "@Configuration",
1437
+ "配置类",
1438
+ "@Configuration"
1439
+ ],
1440
+ [
1441
+ "@Value",
1442
+ "注入值",
1443
+ "@Value(\"${$1}\")"
1444
+ ],
1445
+ [
1446
+ "@Transactional",
1447
+ "事务",
1448
+ "@Transactional"
1449
+ ],
1450
+ [
1451
+ "@Slf4j",
1452
+ "Lombok日志",
1453
+ "@Slf4j"
1454
+ ],
1455
+ [
1456
+ "@Data",
1457
+ "Lombok数据类",
1458
+ "@Data"
1459
+ ],
1460
+ [
1461
+ "@Getter",
1462
+ "Lombok Getter",
1463
+ "@Getter"
1464
+ ],
1465
+ [
1466
+ "@Setter",
1467
+ "Lombok Setter",
1468
+ "@Setter"
1469
+ ],
1470
+ [
1471
+ "@NoArgsConstructor",
1472
+ "无参构造",
1473
+ "@NoArgsConstructor"
1474
+ ],
1475
+ [
1476
+ "@AllArgsConstructor",
1477
+ "全参构造",
1478
+ "@AllArgsConstructor"
1479
+ ],
1480
+ [
1481
+ "@Builder",
1482
+ "Lombok Builder",
1483
+ "@Builder"
1484
+ ],
1485
+ [
1486
+ "@ToString",
1487
+ "Lombok ToString",
1488
+ "@ToString"
1489
+ ],
1490
+ [
1491
+ "@EqualsAndHashCode",
1492
+ "Lombok Equals/HashCode",
1493
+ "@EqualsAndHashCode"
1494
+ ],
1495
+ [
1496
+ "@Test",
1497
+ "JUnit测试",
1498
+ "@Test"
1499
+ ],
1500
+ [
1501
+ "@BeforeEach",
1502
+ "JUnit前置",
1503
+ "@BeforeEach"
1504
+ ],
1505
+ [
1506
+ "@AfterEach",
1507
+ "JUnit后置",
1508
+ "@AfterEach"
1509
+ ],
1510
+ [
1511
+ "@Nullable",
1512
+ "可空",
1513
+ "@Nullable"
1514
+ ],
1515
+ [
1516
+ "@NotNull",
1517
+ "非空",
1518
+ "@NotNull"
1519
+ ],
1520
+ [
1521
+ "@Valid",
1522
+ "验证",
1523
+ "@Valid"
1524
+ ]
1525
+ ], r = a.lastIndexOf("@"), i = a.substring(r + 1).toLowerCase(), o = {
1526
+ startLineNumber: n.lineNumber,
1527
+ endLineNumber: n.lineNumber,
1528
+ startColumn: r + 1,
1529
+ endColumn: n.column
1530
+ };
1531
+ t.filter(([e]) => i.length === 0 || e.toLowerCase().includes(i)).forEach(([t, n, r]) => {
1532
+ s.push({
1533
+ label: t,
1534
+ detail: n,
1535
+ insertText: r,
1536
+ range: o,
1537
+ kind: e.languages.CompletionItemKind.Interface,
1538
+ insertTextRules: e.languages.CompletionItemInsertTextRule.InsertAsSnippet
1539
+ });
1540
+ });
1541
+ }
1542
+ return a.endsWith(".") && [
1543
+ [
1544
+ "toString()",
1545
+ "转字符串",
1546
+ "toString()"
1547
+ ],
1548
+ [
1549
+ "equals()",
1550
+ "比较相等",
1551
+ "equals($1)"
1552
+ ],
1553
+ [
1554
+ "hashCode()",
1555
+ "哈希码",
1556
+ "hashCode()"
1557
+ ],
1558
+ [
1559
+ "getClass()",
1560
+ "获取类",
1561
+ "getClass()"
1562
+ ],
1563
+ [
1564
+ "length()",
1565
+ "字符串长度",
1566
+ "length()"
1567
+ ],
1568
+ [
1569
+ "isEmpty()",
1570
+ "是否为空",
1571
+ "isEmpty()"
1572
+ ],
1573
+ [
1574
+ "isBlank()",
1575
+ "是否空白",
1576
+ "isBlank()"
1577
+ ],
1578
+ [
1579
+ "trim()",
1580
+ "去除空格",
1581
+ "trim()"
1582
+ ],
1583
+ [
1584
+ "strip()",
1585
+ "去除空白",
1586
+ "strip()"
1587
+ ],
1588
+ [
1589
+ "toLowerCase()",
1590
+ "转小写",
1591
+ "toLowerCase()"
1592
+ ],
1593
+ [
1594
+ "toUpperCase()",
1595
+ "转大写",
1596
+ "toUpperCase()"
1597
+ ],
1598
+ [
1599
+ "substring()",
1600
+ "截取子串",
1601
+ "substring($1, $2)"
1602
+ ],
1603
+ [
1604
+ "charAt()",
1605
+ "获取字符",
1606
+ "charAt($1)"
1607
+ ],
1608
+ [
1609
+ "indexOf()",
1610
+ "查找索引",
1611
+ "indexOf($1)"
1612
+ ],
1613
+ [
1614
+ "lastIndexOf()",
1615
+ "最后索引",
1616
+ "lastIndexOf($1)"
1617
+ ],
1618
+ [
1619
+ "contains()",
1620
+ "是否包含",
1621
+ "contains($1)"
1622
+ ],
1623
+ [
1624
+ "startsWith()",
1625
+ "是否开头",
1626
+ "startsWith($1)"
1627
+ ],
1628
+ [
1629
+ "endsWith()",
1630
+ "是否结尾",
1631
+ "endsWith($1)"
1632
+ ],
1633
+ [
1634
+ "replace()",
1635
+ "替换",
1636
+ "replace($1, $2)"
1637
+ ],
1638
+ [
1639
+ "replaceAll()",
1640
+ "正则替换",
1641
+ "replaceAll($1, $2)"
1642
+ ],
1643
+ [
1644
+ "split()",
1645
+ "分割",
1646
+ "split($1)"
1647
+ ],
1648
+ [
1649
+ "join()",
1650
+ "连接",
1651
+ "join($1, $2)"
1652
+ ],
1653
+ [
1654
+ "format()",
1655
+ "格式化",
1656
+ "format($1)"
1657
+ ],
1658
+ [
1659
+ "matches()",
1660
+ "正则匹配",
1661
+ "matches($1)"
1662
+ ],
1663
+ [
1664
+ "add()",
1665
+ "添加元素",
1666
+ "add($1)"
1667
+ ],
1668
+ [
1669
+ "addAll()",
1670
+ "添加所有",
1671
+ "addAll($1)"
1672
+ ],
1673
+ [
1674
+ "remove()",
1675
+ "移除元素",
1676
+ "remove($1)"
1677
+ ],
1678
+ [
1679
+ "removeAll()",
1680
+ "移除所有",
1681
+ "removeAll($1)"
1682
+ ],
1683
+ [
1684
+ "clear()",
1685
+ "清空",
1686
+ "clear()"
1687
+ ],
1688
+ [
1689
+ "size()",
1690
+ "大小",
1691
+ "size()"
1692
+ ],
1693
+ [
1694
+ "get()",
1695
+ "获取元素",
1696
+ "get($1)"
1697
+ ],
1698
+ [
1699
+ "set()",
1700
+ "设置元素",
1701
+ "set($1, $2)"
1702
+ ],
1703
+ [
1704
+ "contains()",
1705
+ "是否包含",
1706
+ "contains($1)"
1707
+ ],
1708
+ [
1709
+ "containsAll()",
1710
+ "是否包含所有",
1711
+ "containsAll($1)"
1712
+ ],
1713
+ [
1714
+ "iterator()",
1715
+ "迭代器",
1716
+ "iterator()"
1717
+ ],
1718
+ [
1719
+ "toArray()",
1720
+ "转数组",
1721
+ "toArray()"
1722
+ ],
1723
+ [
1724
+ "stream()",
1725
+ "流",
1726
+ "stream()"
1727
+ ],
1728
+ [
1729
+ "forEach()",
1730
+ "遍历",
1731
+ "forEach($1 -> $2)"
1732
+ ],
1733
+ [
1734
+ "put()",
1735
+ "放入",
1736
+ "put($1, $2)"
1737
+ ],
1738
+ [
1739
+ "putAll()",
1740
+ "放入所有",
1741
+ "putAll($1)"
1742
+ ],
1743
+ [
1744
+ "get()",
1745
+ "获取",
1746
+ "get($1)"
1747
+ ],
1748
+ [
1749
+ "getOrDefault()",
1750
+ "获取或默认",
1751
+ "getOrDefault($1, $2)"
1752
+ ],
1753
+ [
1754
+ "containsKey()",
1755
+ "包含键",
1756
+ "containsKey($1)"
1757
+ ],
1758
+ [
1759
+ "containsValue()",
1760
+ "包含值",
1761
+ "containsValue($1)"
1762
+ ],
1763
+ [
1764
+ "keySet()",
1765
+ "键集合",
1766
+ "keySet()"
1767
+ ],
1768
+ [
1769
+ "values()",
1770
+ "值集合",
1771
+ "values()"
1772
+ ],
1773
+ [
1774
+ "entrySet()",
1775
+ "条目集合",
1776
+ "entrySet()"
1777
+ ],
1778
+ [
1779
+ "filter()",
1780
+ "过滤",
1781
+ "filter($1 -> $2)"
1782
+ ],
1783
+ [
1784
+ "map()",
1785
+ "映射",
1786
+ "map($1 -> $2)"
1787
+ ],
1788
+ [
1789
+ "flatMap()",
1790
+ "扁平映射",
1791
+ "flatMap($1 -> $2)"
1792
+ ],
1793
+ [
1794
+ "sorted()",
1795
+ "排序",
1796
+ "sorted()"
1797
+ ],
1798
+ [
1799
+ "distinct()",
1800
+ "去重",
1801
+ "distinct()"
1802
+ ],
1803
+ [
1804
+ "limit()",
1805
+ "限制",
1806
+ "limit($1)"
1807
+ ],
1808
+ [
1809
+ "skip()",
1810
+ "跳过",
1811
+ "skip($1)"
1812
+ ],
1813
+ [
1814
+ "collect()",
1815
+ "收集",
1816
+ "collect(Collectors.$1)"
1817
+ ],
1818
+ [
1819
+ "toList()",
1820
+ "转列表",
1821
+ "toList()"
1822
+ ],
1823
+ [
1824
+ "findFirst()",
1825
+ "查找第一个",
1826
+ "findFirst()"
1827
+ ],
1828
+ [
1829
+ "findAny()",
1830
+ "查找任意",
1831
+ "findAny()"
1832
+ ],
1833
+ [
1834
+ "anyMatch()",
1835
+ "任意匹配",
1836
+ "anyMatch($1 -> $2)"
1837
+ ],
1838
+ [
1839
+ "allMatch()",
1840
+ "全部匹配",
1841
+ "allMatch($1 -> $2)"
1842
+ ],
1843
+ [
1844
+ "noneMatch()",
1845
+ "无匹配",
1846
+ "noneMatch($1 -> $2)"
1847
+ ],
1848
+ [
1849
+ "count()",
1850
+ "计数",
1851
+ "count()"
1852
+ ],
1853
+ [
1854
+ "reduce()",
1855
+ "归约",
1856
+ "reduce($1, ($2, $3) -> $4)"
1857
+ ],
1858
+ [
1859
+ "isPresent()",
1860
+ "是否存在",
1861
+ "isPresent()"
1862
+ ],
1863
+ [
1864
+ "isEmpty()",
1865
+ "是否为空",
1866
+ "isEmpty()"
1867
+ ],
1868
+ [
1869
+ "get()",
1870
+ "获取值",
1871
+ "get()"
1872
+ ],
1873
+ [
1874
+ "orElse()",
1875
+ "或者",
1876
+ "orElse($1)"
1877
+ ],
1878
+ [
1879
+ "orElseGet()",
1880
+ "或者获取",
1881
+ "orElseGet(() -> $1)"
1882
+ ],
1883
+ [
1884
+ "orElseThrow()",
1885
+ "或者抛出",
1886
+ "orElseThrow(() -> new $1())"
1887
+ ],
1888
+ [
1889
+ "ifPresent()",
1890
+ "如果存在",
1891
+ "ifPresent($1 -> $2)"
1892
+ ],
1893
+ [
1894
+ "map()",
1895
+ "映射",
1896
+ "map($1 -> $2)"
1897
+ ],
1898
+ [
1899
+ "flatMap()",
1900
+ "扁平映射",
1901
+ "flatMap($1 -> $2)"
1902
+ ],
1903
+ [
1904
+ "filter()",
1905
+ "过滤",
1906
+ "filter($1 -> $2)"
1907
+ ],
1908
+ [
1909
+ "println()",
1910
+ "打印换行",
1911
+ "println($1)"
1912
+ ],
1913
+ [
1914
+ "print()",
1915
+ "打印",
1916
+ "print($1)"
1917
+ ],
1918
+ [
1919
+ "printf()",
1920
+ "格式化打印",
1921
+ "printf($1)"
1922
+ ]
1923
+ ].forEach(([t, n, r]) => {
1924
+ s.push({
1925
+ label: t,
1926
+ detail: n,
1927
+ insertText: r,
1928
+ range: i,
1929
+ kind: e.languages.CompletionItemKind.Method,
1930
+ insertTextRules: e.languages.CompletionItemInsertTextRule.InsertAsSnippet
1931
+ });
1932
+ }), o.length >= 1 && [
1933
+ [
1934
+ "sout",
1935
+ "System.out.println",
1936
+ "System.out.println($1);"
1937
+ ],
1938
+ [
1939
+ "soutv",
1940
+ "打印变量",
1941
+ "System.out.println(\"$1 = \" + $1);"
1942
+ ],
1943
+ [
1944
+ "serr",
1945
+ "System.err.println",
1946
+ "System.err.println($1);"
1947
+ ],
1948
+ [
1949
+ "souf",
1950
+ "System.out.printf",
1951
+ "System.out.printf(\"$1%n\", $2);"
1952
+ ],
1953
+ [
1954
+ "psvm",
1955
+ "main方法",
1956
+ "public static void main(String[] args) {\n $1\n}"
1957
+ ],
1958
+ [
1959
+ "main",
1960
+ "main方法",
1961
+ "public static void main(String[] args) {\n $1\n}"
1962
+ ],
1963
+ [
1964
+ "pub",
1965
+ "public方法",
1966
+ "public $1 $2($3) {\n $4\n}"
1967
+ ],
1968
+ [
1969
+ "priv",
1970
+ "private方法",
1971
+ "private $1 $2($3) {\n $4\n}"
1972
+ ],
1973
+ [
1974
+ "prot",
1975
+ "protected方法",
1976
+ "protected $1 $2($3) {\n $4\n}"
1977
+ ],
1978
+ [
1979
+ "pubsf",
1980
+ "public static final",
1981
+ "public static final $1 $2 = $3;"
1982
+ ],
1983
+ [
1984
+ "privsf",
1985
+ "private static final",
1986
+ "private static final $1 $2 = $3;"
1987
+ ],
1988
+ [
1989
+ "fori",
1990
+ "for i循环",
1991
+ "for (int i = 0; i < $1; i++) {\n $2\n}"
1992
+ ],
1993
+ [
1994
+ "forr",
1995
+ "for 倒序循环",
1996
+ "for (int i = $1 - 1; i >= 0; i--) {\n $2\n}"
1997
+ ],
1998
+ [
1999
+ "fore",
2000
+ "增强for循环",
2001
+ "for ($1 $2 : $3) {\n $4\n}"
2002
+ ],
2003
+ [
2004
+ "iter",
2005
+ "迭代器循环",
2006
+ "for (Iterator<$1> it = $2.iterator(); it.hasNext(); ) {\n $1 $3 = it.next();\n $4\n}"
2007
+ ],
2008
+ [
2009
+ "while",
2010
+ "while循环",
2011
+ "while ($1) {\n $2\n}"
2012
+ ],
2013
+ [
2014
+ "dowhile",
2015
+ "do-while循环",
2016
+ "do {\n $1\n} while ($2);"
2017
+ ],
2018
+ [
2019
+ "ife",
2020
+ "if-else",
2021
+ "if ($1) {\n $2\n} else {\n $3\n}"
2022
+ ],
2023
+ [
2024
+ "ifn",
2025
+ "if null",
2026
+ "if ($1 == null) {\n $2\n}"
2027
+ ],
2028
+ [
2029
+ "ifnn",
2030
+ "if not null",
2031
+ "if ($1 != null) {\n $2\n}"
2032
+ ],
2033
+ [
2034
+ "tern",
2035
+ "三元表达式",
2036
+ "$1 ? $2 : $3"
2037
+ ],
2038
+ [
2039
+ "tryc",
2040
+ "try-catch",
2041
+ "try {\n $1\n} catch (Exception e) {\n $2\n}"
2042
+ ],
2043
+ [
2044
+ "trycf",
2045
+ "try-catch-finally",
2046
+ "try {\n $1\n} catch (Exception e) {\n $2\n} finally {\n $3\n}"
2047
+ ],
2048
+ [
2049
+ "tryr",
2050
+ "try-with-resources",
2051
+ "try ($1) {\n $2\n} catch (Exception e) {\n $3\n}"
2052
+ ],
2053
+ [
2054
+ "throw",
2055
+ "抛出异常",
2056
+ "throw new $1(\"$2\");"
2057
+ ],
2058
+ [
2059
+ "lst",
2060
+ "new ArrayList",
2061
+ "List<$1> $2 = new ArrayList<>();"
2062
+ ],
2063
+ [
2064
+ "lstaof",
2065
+ "List.of",
2066
+ "List.of($1)"
2067
+ ],
2068
+ [
2069
+ "map",
2070
+ "new HashMap",
2071
+ "Map<$1, $2> $3 = new HashMap<>();"
2072
+ ],
2073
+ [
2074
+ "mapof",
2075
+ "Map.of",
2076
+ "Map.of($1, $2)"
2077
+ ],
2078
+ [
2079
+ "set",
2080
+ "new HashSet",
2081
+ "Set<$1> $2 = new HashSet<>();"
2082
+ ],
2083
+ [
2084
+ "setof",
2085
+ "Set.of",
2086
+ "Set.of($1)"
2087
+ ],
2088
+ [
2089
+ "stream",
2090
+ "stream操作",
2091
+ "$1.stream()\n .filter($2 -> $3)\n .map($4 -> $5)\n .collect(Collectors.toList())"
2092
+ ],
2093
+ [
2094
+ "streamf",
2095
+ "stream filter",
2096
+ "$1.stream().filter($2 -> $3).collect(Collectors.toList())"
2097
+ ],
2098
+ [
2099
+ "streamm",
2100
+ "stream map",
2101
+ "$1.stream().map($2 -> $3).collect(Collectors.toList())"
2102
+ ],
2103
+ [
2104
+ "foreach",
2105
+ "forEach",
2106
+ "$1.forEach($2 -> {\n $3\n});"
2107
+ ],
2108
+ [
2109
+ "opt",
2110
+ "Optional.of",
2111
+ "Optional.of($1)"
2112
+ ],
2113
+ [
2114
+ "optn",
2115
+ "Optional.ofNullable",
2116
+ "Optional.ofNullable($1)"
2117
+ ],
2118
+ [
2119
+ "opte",
2120
+ "Optional.empty",
2121
+ "Optional.empty()"
2122
+ ],
2123
+ [
2124
+ "log",
2125
+ "log.info",
2126
+ "log.info(\"$1\");"
2127
+ ],
2128
+ [
2129
+ "logd",
2130
+ "log.debug",
2131
+ "log.debug(\"$1\");"
2132
+ ],
2133
+ [
2134
+ "logw",
2135
+ "log.warn",
2136
+ "log.warn(\"$1\");"
2137
+ ],
2138
+ [
2139
+ "loge",
2140
+ "log.error",
2141
+ "log.error(\"$1\", $2);"
2142
+ ],
2143
+ [
2144
+ "logt",
2145
+ "log.trace",
2146
+ "log.trace(\"$1\");"
2147
+ ],
2148
+ [
2149
+ "logv",
2150
+ "log变量",
2151
+ "log.info(\"$1 = {}\", $1);"
2152
+ ],
2153
+ [
2154
+ "test",
2155
+ "@Test方法",
2156
+ "@Test\nvoid $1() {\n $2\n}"
2157
+ ],
2158
+ [
2159
+ "testd",
2160
+ "@Test带DisplayName",
2161
+ "@Test\n@DisplayName(\"$1\")\nvoid $2() {\n $3\n}"
2162
+ ],
2163
+ [
2164
+ "before",
2165
+ "@BeforeEach",
2166
+ "@BeforeEach\nvoid setUp() {\n $1\n}"
2167
+ ],
2168
+ [
2169
+ "after",
2170
+ "@AfterEach",
2171
+ "@AfterEach\nvoid tearDown() {\n $1\n}"
2172
+ ],
2173
+ [
2174
+ "aseq",
2175
+ "assertEquals",
2176
+ "assertEquals($1, $2);"
2177
+ ],
2178
+ [
2179
+ "asne",
2180
+ "assertNotEquals",
2181
+ "assertNotEquals($1, $2);"
2182
+ ],
2183
+ [
2184
+ "ast",
2185
+ "assertTrue",
2186
+ "assertTrue($1);"
2187
+ ],
2188
+ [
2189
+ "asf",
2190
+ "assertFalse",
2191
+ "assertFalse($1);"
2192
+ ],
2193
+ [
2194
+ "asn",
2195
+ "assertNull",
2196
+ "assertNull($1);"
2197
+ ],
2198
+ [
2199
+ "asnn",
2200
+ "assertNotNull",
2201
+ "assertNotNull($1);"
2202
+ ],
2203
+ [
2204
+ "asth",
2205
+ "assertThrows",
2206
+ "assertThrows($1.class, () -> {\n $2\n});"
2207
+ ],
2208
+ [
2209
+ "lam",
2210
+ "lambda表达式",
2211
+ "($1) -> $2"
2212
+ ],
2213
+ [
2214
+ "lamb",
2215
+ "lambda块",
2216
+ "($1) -> {\n $2\n}"
2217
+ ],
2218
+ [
2219
+ "mr",
2220
+ "方法引用",
2221
+ "$1::$2"
2222
+ ],
2223
+ [
2224
+ "ctor",
2225
+ "构造方法",
2226
+ "public $1($2) {\n $3\n}"
2227
+ ],
2228
+ [
2229
+ "ctord",
2230
+ "默认构造方法",
2231
+ "public $1() {\n}"
2232
+ ],
2233
+ [
2234
+ "get",
2235
+ "getter方法",
2236
+ "public $1 get$2() {\n return this.$3;\n}"
2237
+ ],
2238
+ [
2239
+ "set",
2240
+ "setter方法",
2241
+ "public void set$1($2 $3) {\n this.$3 = $3;\n}"
2242
+ ],
2243
+ [
2244
+ "getset",
2245
+ "getter和setter",
2246
+ "public $1 get$2() {\n return this.$3;\n}\n\npublic void set$2($1 $3) {\n this.$3 = $3;\n}"
2247
+ ],
2248
+ [
2249
+ "tostr",
2250
+ "toString方法",
2251
+ "@Override\npublic String toString() {\n return \"$1{\" +\n \"$2=\" + $2 +\n '}';\n}"
2252
+ ],
2253
+ [
2254
+ "eqhc",
2255
+ "equals和hashCode",
2256
+ "@Override\npublic boolean equals(Object o) {\n if (this == o) return true;\n if (o == null || getClass() != o.getClass()) return false;\n $1 that = ($1) o;\n return Objects.equals($2, that.$2);\n}\n\n@Override\npublic int hashCode() {\n return Objects.hash($2);\n}"
2257
+ ],
2258
+ [
2259
+ "singleton",
2260
+ "单例模式",
2261
+ "private static final $1 INSTANCE = new $1();\n\nprivate $1() {}\n\npublic static $1 getInstance() {\n return INSTANCE;\n}"
2262
+ ],
2263
+ [
2264
+ "now",
2265
+ "LocalDateTime.now",
2266
+ "LocalDateTime.now()"
2267
+ ],
2268
+ [
2269
+ "today",
2270
+ "LocalDate.now",
2271
+ "LocalDate.now()"
2272
+ ],
2273
+ [
2274
+ "dtf",
2275
+ "DateTimeFormatter",
2276
+ "DateTimeFormatter.ofPattern(\"$1\")"
2277
+ ]
2278
+ ].filter(([e]) => e.toLowerCase().startsWith(o)).forEach(([t, n, r]) => {
2279
+ s.push({
2280
+ label: t,
2281
+ detail: n,
2282
+ insertText: r,
2283
+ range: i,
2284
+ kind: e.languages.CompletionItemKind.Snippet,
2285
+ insertTextRules: e.languages.CompletionItemInsertTextRule.InsertAsSnippet,
2286
+ sortText: "1" + t
2287
+ });
2288
+ }), { suggestions: s };
2289
+ }
2290
+ }));
2291
+ }
2292
+ //#endregion
2293
+ export { t as conf, r as defineJavaThemes, n as language, a as registerJavaCompletion };
2294
+
2295
+ //# sourceMappingURL=java-XIxqoWBD.js.map