1-
21export function getArrayListSuggestions ( monaco : typeof import ( 'monaco-editor' ) , range : any ) {
32 return [
43 {
@@ -23,13 +22,65 @@ export function getArrayListSuggestions(monaco: typeof import('monaco-editor'),
2322 documentation : 'Returns the element at the specified index.' ,
2423 range : range
2524 } ,
25+ {
26+ label : 'set' ,
27+ kind : monaco . languages . CompletionItemKind . Method ,
28+ insertText : 'set(${1:index}, ${2:element});' ,
29+ insertTextRules : monaco . languages . CompletionItemInsertTextRule . InsertAsSnippet ,
30+ documentation : 'Replaces the element at the specified index with the specified element.' ,
31+ range : range
32+ } ,
2633 {
2734 label : 'size' ,
2835 kind : monaco . languages . CompletionItemKind . Method ,
2936 insertText : 'size();' ,
3037 documentation : 'Returns the number of elements in the ArrayList.' ,
3138 range : range
39+ } ,
40+ {
41+ label : 'clear' ,
42+ kind : monaco . languages . CompletionItemKind . Method ,
43+ insertText : 'clear();' ,
44+ documentation : 'Removes all elements from the ArrayList.' ,
45+ range : range
46+ } ,
47+ {
48+ label : 'contains' ,
49+ kind : monaco . languages . CompletionItemKind . Method ,
50+ insertText : 'contains(${1:element});' ,
51+ insertTextRules : monaco . languages . CompletionItemInsertTextRule . InsertAsSnippet ,
52+ documentation : 'Returns true if this list contains the specified element.' ,
53+ range : range
54+ } ,
55+ {
56+ label : 'indexOf' ,
57+ kind : monaco . languages . CompletionItemKind . Method ,
58+ insertText : 'indexOf(${1:element});' ,
59+ insertTextRules : monaco . languages . CompletionItemInsertTextRule . InsertAsSnippet ,
60+ documentation : 'Returns the index of the first occurrence of the specified element, or -1 if this list does not contain the element.' ,
61+ range : range
62+ } ,
63+ {
64+ label : 'lastIndexOf' ,
65+ kind : monaco . languages . CompletionItemKind . Method ,
66+ insertText : 'lastIndexOf(${1:element});' ,
67+ insertTextRules : monaco . languages . CompletionItemInsertTextRule . InsertAsSnippet ,
68+ documentation : 'Returns the index of the last occurrence of the specified element, or -1 if this list does not contain the element.' ,
69+ range : range
70+ } ,
71+ {
72+ label : 'isEmpty' ,
73+ kind : monaco . languages . CompletionItemKind . Method ,
74+ insertText : 'isEmpty();' ,
75+ documentation : 'Returns true if this list contains no elements.' ,
76+ range : range
77+ } ,
78+ {
79+ label : 'toArray' ,
80+ kind : monaco . languages . CompletionItemKind . Method ,
81+ insertText : 'toArray();' ,
82+ documentation : 'Returns an array containing all of the elements in this list in proper sequence.' ,
83+ range : range
3284 }
33- // 其他 ArrayList 方法
3485 ] ;
3586}
0 commit comments