-
Notifications
You must be signed in to change notification settings - Fork 64
/
tagoperators.py
633 lines (617 loc) · 35.9 KB
/
tagoperators.py
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
import sublime
import sublime_plugin
import re
attributes = {}
attributes["exit \"$1\";"] = []
attributes["pageencoding \"$1\";"] = []
attributes["include \"$1\";"] = []
attributes["import \"$1\";"] = []
attributes["throw \"$1\";"] = []
attributes["rethrow"] = []
attributes["location"] = []
attributes["abort"] = []
attributes["trace"] = []
attributes["break"] = []
attributes["continue"] = []
attributes["try"] = []
attributes["finally"] = []
attributes["component"] = [
("extends\t@extends", "extends=\"$1\"$0"),
("initmethod\t@initmethod", "initmethod=\"$1\"$0"),
("implements\t@implements", "implements=\"$1\"$0"),
("output\t@output", "output=\"$1\"$0"),
("output=\"true\"\toutput", "output=\"${1:true}\"$0"),
("output=\"false\"\toutput", "output=\"${1:false}\"$0"),
("displayname\t@displayname", "displayname=\"$1\"$0"),
("hint\t@hint", "hint=\"$1\"$0"),
("style\t@style", "style=\"$1\"$0"),
("style=\"rpc\"\tstyle", "style=\"${1:rpc}\"$0"),
("style=\"document\"\tstyle", "style=\"${1:document}\"$0"),
("style=\"wrapped\"\tstyle", "style=\"${1:wrapped}\"$0"),
("namespace\t@namespace", "namespace=\"$1\"$0"),
("serviceportname\t@serviceportname", "serviceportname=\"$1\"$0"),
("porttypename\t@porttypename", "porttypename=\"$1\"$0"),
("bindingname\t@bindingname", "bindingname=\"$1\"$0"),
("wsdlfile\t@wsdlfile", "wsdlfile=\"$1\"$0"),
("serviceaddress\t@serviceaddress", "serviceaddress=\"$1\"$0"),
("persistent\t@persistent", "persistent=\"$1\"$0"),
("persistent=\"true\"\tpersistent", "persistent=\"${1:true}\"$0"),
("persistent=\"false\"\tpersistent", "persistent=\"${1:false}\"$0"),
("entityName\t@entityName", "entityName=\"$1\"$0"),
("table\t@table", "table=\"$1\"$0"),
("schema\t@schema", "schema=\"$1\"$0"),
("catalog\t@catalog", "catalog=\"$1\"$0"),
("dynamicinsert\t@dynamicinsert", "dynamicinsert=\"$1\"$0"),
("dynamicinsert=\"true\"\tdynamicinsert", "dynamicinsert=\"${1:true}\"$0"),
("dynamicinsert=\"false\"\tdynamicinsert", "dynamicinsert=\"${1:false}\"$0"),
("dynamicupdate\t@dynamicupdate", "dynamicupdate=\"$1\"$0"),
("dynamicupdate=\"true\"\tdynamicupdate", "dynamicupdate=\"${1:true}\"$0"),
("dynamicupdate=\"false\"\tdynamicupdate", "dynamicupdate=\"${1:false}\"$0"),
("readonly\t@readonly", "readonly=\"$1\"$0"),
("readonly=\"true\"\treadonly", "readonly=\"${1:true}\"$0"),
("readonly=\"false\"\treadonly", "readonly=\"${1:false}\"$0"),
("selectbeforeupdate\t@selectbeforeupdate", "selectbeforeupdate=\"$1\"$0"),
("selectbeforeupdate=\"true\"\tselectbeforeupdate", "selectbeforeupdate=\"${1:true}\"$0"),
("selectbeforeupdate=\"false\"\tselectbeforeupdate", "selectbeforeupdate=\"${1:false}\"$0"),
("batchsize\t@batchsize", "batchsize=\"$1\"$0"),
("optimisticlock\t@optimisticlock", "optimisticlock=\"$1\"$0"),
("optimisticlock=\"none\"\toptimisticlock", "optimisticlock=\"${1:none}\"$0"),
("optimisticlock=\"dirty\"\toptimisticlock", "optimisticlock=\"${1:dirty}\"$0"),
("optimisticlock=\"all\"\toptimisticlock", "optimisticlock=\"${1:all}\"$0"),
("optimisticlock=\"version\"\toptimisticlock", "optimisticlock=\"${1:version}\"$0"),
("lazy\t@lazy", "lazy=\"$1\"$0"),
("lazy=\"true\"\tlazy", "lazy=\"${1:true}\"$0"),
("lazy=\"false\"\tlazy", "lazy=\"${1:false}\"$0"),
("rowid\t@rowid", "rowid=\"$1\"$0"),
("discriminatorColumn\t@discriminatorColumn", "discriminatorColumn=\"$1\"$0"),
("discriminatorValue\t@discriminatorValue", "discriminatorValue=\"$1\"$0"),
("joinColumn\t@joinColumn", "joinColumn=\"$1\"$0"),
("embedded\t@embedded", "embedded=\"$1\"$0"),
("embedded=\"true\"\tembedded", "embedded=\"${1:true}\"$0"),
("embedded=\"false\"\tembedded", "embedded=\"${1:false}\"$0"),
("cacheUse\t@cacheUse", "cacheUse=\"$1\"$0"),
("cacheUse=\"read-only\"\tcacheUse", "cacheUse=\"${1:read-only}\"$0"),
("cacheUse=\"nonstrict-read-write\"\tcacheUse", "cacheUse=\"${1:nonstrict-read-write}\"$0"),
("cacheUse=\"read-write\"\tcacheUse", "cacheUse=\"${1:read-write}\"$0"),
("cacheUse=\"transactional\"\tcacheUse", "cacheUse=\"${1:transactional}\"$0"),
("cacheName\t@cacheName", "cacheName=\"$1\"$0"),
("saveMapping\t@saveMapping", "saveMapping=\"$1\"$0"),
("saveMapping=\"true\"\tsaveMapping", "saveMapping=\"${1:true}\"$0"),
("saveMapping=\"false\"\tsaveMapping", "saveMapping=\"${1:false}\"$0"),
("accessors\t@accessors", "accessors=\"$1\"$0"),
("accessors=\"true\"\taccessors", "accessors=\"${1:true}\"$0"),
("accessors=\"false\"\taccessors", "accessors=\"${1:false}\"$0"),
("serializable\t@serializable", "serializable=\"$1\"$0"),
("serializable=\"true\"\tserializable", "serializable=\"${1:true}\"$0"),
("serializable=\"false\"\tserializable", "serializable=\"${1:false}\"$0"),
("alias\t@alias", "alias=\"$1\"$0"),
("datasource\t@datasource", "datasource=\"$1\"$0"),
("mappedSuperClass\t@mappedSuperClass", "mappedSuperClass=\"$1\"$0"),
("mappedSuperClass=\"true\"\tmappedSuperClass", "mappedSuperClass=\"${1:true}\"$0"),
("mappedSuperClass=\"false\"\tmappedSuperClass", "mappedSuperClass=\"${1:false}\"$0"),
("rest\t@rest", "rest=\"$1\"$0"),
("rest=\"true\"\trest", "rest=\"${1:true}\"$0"),
("rest=\"false\"\trest", "rest=\"${1:false}\"$0"),
("restPath\t@restPath", "restPath=\"$1\"$0"),
("httpMethod\t@httpMethod", "httpMethod=\"$1\"$0"),
("httpMethod=\"GET\"\thttpMethod", "httpMethod=\"${1:GET}\"$0"),
("httpMethod=\"DELETE\"\thttpMethod", "httpMethod=\"${1:DELETE}\"$0"),
("httpMethod=\"POST\"\thttpMethod", "httpMethod=\"${1:POST}\"$0"),
("httpMethod=\"PUT\"\thttpMethod", "httpMethod=\"${1:PUT}\"$0"),
("httpMethod=\"HEAD\"\thttpMethod", "httpMethod=\"${1:HEAD}\"$0"),
("httpMethod=\"OPTIONS\"\thttpMethod", "httpMethod=\"${1:OPTIONS}\"$0"),
("produces\t@produces", "produces=\"$1\"$0"),
("consumes\t@consumes", "consumes=\"$1\"$0"),
("indexable\t@indexable", "indexable=\"$1\"$0"),
("indexable=\"true\"\tindexable", "indexable=\"${1:true}\"$0"),
("indexable=\"false\"\tindexable", "indexable=\"${1:false}\"$0"),
("indexLanguage\t@indexLanguage", "indexLanguage=\"$1\"$0"),
("autoindex\t@autoindex", "autoindex=\"$1\"$0"),
("autoindex=\"true\"\tautoindex", "autoindex=\"${1:true}\"$0"),
("autoindex=\"false\"\tautoindex", "autoindex=\"${1:false}\"$0"),
("wsversion\t@wsversion", "wsversion=\"$1\"$0"),
("wsversion=\"1\"\twsversion", "wsversion=\"${1:1}\"$0"),
("wsversion=\"2\"\twsversion", "wsversion=\"${1:2}\"$0")
]
attributes["lock"] = [
("timeout\t@timeout", "timeout=\"$1\"$0"),
("scope\t@scope", "scope=\"$1\"$0"),
("scope=\"Application\"\tscope", "scope=\"${1:Application}\"$0"),
("scope=\"request\"\tscope", "scope=\"${1:request}\"$0"),
("scope=\"Server\"\tscope", "scope=\"${1:Server}\"$0"),
("scope=\"Session\"\tscope", "scope=\"${1:Session}\"$0"),
("name\t@name", "name=\"$1\"$0"),
("throwontimeout\t@throwontimeout", "throwontimeout=\"$1\"$0"),
("throwontimeout=\"true\"\tthrowontimeout", "throwontimeout=\"${1:true}\"$0"),
("throwontimeout=\"false\"\tthrowontimeout", "throwontimeout=\"${1:false}\"$0"),
("type\t@type", "type=\"$1\"$0"),
("type=\"readonly\"\ttype", "type=\"${1:readonly}\"$0"),
("type=\"exclusive\"\ttype", "type=\"${1:exclusive}\"$0")
]
attributes["schedule"] = [
("action\t@action", "action=\"$1\"$0"),
("action=\"delete\"\taction", "action=\"${1:delete}\"$0"),
("action=\"update\"\taction", "action=\"${1:update}\"$0"),
("action=\"run\"\taction", "action=\"${1:run}\"$0"),
("action=\"pause\"\taction", "action=\"${1:pause}\"$0"),
("action=\"resume\"\taction", "action=\"${1:resume}\"$0"),
("action=\"list\"\taction", "action=\"${1:list}\"$0"),
("action=\"pauseall\"\taction", "action=\"${1:pauseall}\"$0"),
("action=\"resumeall\"\taction", "action=\"${1:resumeall}\"$0"),
("task\t@task", "task=\"$1\"$0"),
("operation\t@operation", "operation=\"$1\"$0"),
("operation=\"HTTPRequest\"\toperation", "operation=\"${1:HTTPRequest}\"$0"),
("file\t@file", "file=\"$1\"$0"),
("path\t@path", "path=\"$1\"$0"),
("startdate\t@startdate", "startdate=\"$1\"$0"),
("starttime\t@starttime", "starttime=\"$1\"$0"),
("URL\t@URL", "URL=\"$1\"$0"),
("port\t@port", "port=\"$1\"$0"),
("publish\t@publish", "publish=\"$1\"$0"),
("publish=\"true\"\tpublish", "publish=\"${1:true}\"$0"),
("publish=\"false\"\tpublish", "publish=\"${1:false}\"$0"),
("endDate\t@endDate", "endDate=\"$1\"$0"),
("endTime\t@endTime", "endTime=\"$1\"$0"),
("interval\t@interval", "interval=\"$1\"$0"),
("interval=\"once\"\tinterval", "interval=\"${1:once}\"$0"),
("interval=\"daily\"\tinterval", "interval=\"${1:daily}\"$0"),
("interval=\"weekly\"\tinterval", "interval=\"${1:weekly}\"$0"),
("interval=\"monthly\"\tinterval", "interval=\"${1:monthly}\"$0"),
("requesttimeout\t@requesttimeout", "requesttimeout=\"$1\"$0"),
("username\t@username", "username=\"$1\"$0"),
("password\t@password", "password=\"$1\"$0"),
("proxyserver\t@proxyserver", "proxyserver=\"$1\"$0"),
("proxyport\t@proxyport", "proxyport=\"$1\"$0"),
("proxyuser\t@proxyuser", "proxyuser=\"$1\"$0"),
("proxypassword\t@proxypassword", "proxypassword=\"$1\"$0"),
("resolveurl\t@resolveurl", "resolveurl=\"$1\"$0"),
("resolveurl=\"true\"\tresolveurl", "resolveurl=\"${1:true}\"$0"),
("resolveurl=\"false\"\tresolveurl", "resolveurl=\"${1:false}\"$0"),
("group\t@group", "group=\"$1\"$0"),
("onException\t@onException", "onException=\"$1\"$0"),
("onException=\"REFIRE\"\tonException", "onException=\"${1:REFIRE}\"$0"),
("onException=\"PAUSE\"\tonException", "onException=\"${1:PAUSE}\"$0"),
("onException=\"INVOKEHANDLER\"\tonException", "onException=\"${1:INVOKEHANDLER}\"$0"),
("repeat\t@repeat", "repeat=\"$1\"$0"),
("onComplete\t@onComplete", "onComplete=\"$1\"$0"),
("cronTime\t@cronTime", "cronTime=\"$1\"$0"),
("priority\t@priority", "priority=\"$1\"$0"),
("eventHandler\t@eventHandler", "eventHandler=\"$1\"$0"),
("exclude\t@exclude", "exclude=\"$1\"$0"),
("cluster\t@cluster", "cluster=\"$1\"$0"),
("cluster=\"true\"\tcluster", "cluster=\"${1:true}\"$0"),
("cluster=\"false\"\tcluster", "cluster=\"${1:false}\"$0"),
("onMisfire\t@onMisfire", "onMisfire=\"$1\"$0"),
("onMisfire=\"true\"\tonMisfire", "onMisfire=\"${1:true}\"$0"),
("onMisfire=\"false\"\tonMisfire", "onMisfire=\"${1:false}\"$0"),
("retrycount\t@retrycount", "retrycount=\"$1\"$0"),
("mode\t@mode", "mode=\"$1\"$0"),
("mode=\"SERVER\"\tmode", "mode=\"${1:SERVER}\"$0"),
("mode=\"APPLICATION\"\tmode", "mode=\"${1:APPLICATION}\"$0"),
("result\t@result", "result=\"$1\"$0"),
("overwrite\t@overwrite", "overwrite=\"$1\"$0"),
("overwrite=\"true\"\toverwrite", "overwrite=\"${1:true}\"$0"),
("overwrite=\"false\"\toverwrite", "overwrite=\"${1:false}\"$0")
]
attributes["savecontent"] = [
("variable\t@variable", "variable=\"$1\"$0")
]
attributes["interface"] = [
("displayName\t@displayName", "displayName=\"$1\"$0"),
("extends\t@extends", "extends=\"$1\"$0"),
("hint\t@hint", "hint=\"$1\"$0")
]
attributes["thread"] = [
("action\t@action", "action=\"$1\"$0"),
("action=\"join\"\taction", "action=\"${1:join}\"$0"),
("action=\"run\"\taction", "action=\"${1:run}\"$0"),
("action=\"sleep\"\taction", "action=\"${1:sleep}\"$0"),
("action=\"terminate\"\taction", "action=\"${1:terminate}\"$0"),
("duration\t@duration", "duration=\"$1\"$0"),
("name\t@name", "name=\"$1\"$0"),
("priority\t@priority", "priority=\"$1\"$0"),
("priority=\"HIGH\"\tpriority", "priority=\"${1:HIGH}\"$0"),
("priority=\"LOW\"\tpriority", "priority=\"${1:LOW}\"$0"),
("priority=\"NORMAL\"\tpriority", "priority=\"${1:NORMAL}\"$0"),
("timeout\t@timeout", "timeout=\"$1\"$0")
]
attributes["property"] = [
("name\t@name", "name=\"$1\"$0"),
("type\t@type", "type=\"$1\"$0"),
("type=\"any\"\ttype", "type=\"${1:any}\"$0"),
("type=\"array\"\ttype", "type=\"${1:array}\"$0"),
("type=\"binary\"\ttype", "type=\"${1:binary}\"$0"),
("type=\"boolean\"\ttype", "type=\"${1:boolean}\"$0"),
("type=\"date\"\ttype", "type=\"${1:date}\"$0"),
("type=\"guid\"\ttype", "type=\"${1:guid}\"$0"),
("type=\"numeric\"\ttype", "type=\"${1:numeric}\"$0"),
("type=\"query\"\ttype", "type=\"${1:query}\"$0"),
("type=\"string\"\ttype", "type=\"${1:string}\"$0"),
("type=\"struct\"\ttype", "type=\"${1:struct}\"$0"),
("type=\"uuid\"\ttype", "type=\"${1:uuid}\"$0"),
("type=\"variablename\"\ttype", "type=\"${1:variablename}\"$0"),
("required\t@required", "required=\"$1\"$0"),
("required=\"true\"\trequired", "required=\"${1:true}\"$0"),
("required=\"false\"\trequired", "required=\"${1:false}\"$0"),
("default\t@default", "default=\"$1\"$0"),
("displayname\t@displayname", "displayname=\"$1\"$0"),
("hint\t@hint", "hint=\"$1\"$0"),
("fieldtype\t@fieldtype", "fieldtype=\"$1\"$0"),
("fieldtype=\"id\"\tfieldtype", "fieldtype=\"${1:id}\"$0"),
("fieldtype=\"column\"\tfieldtype", "fieldtype=\"${1:column}\"$0"),
("fieldtype=\"one-to-one\"\tfieldtype", "fieldtype=\"${1:one-to-one}\"$0"),
("fieldtype=\"one-to-many\"\tfieldtype", "fieldtype=\"${1:one-to-many}\"$0"),
("fieldtype=\"many-to-many\"\tfieldtype", "fieldtype=\"${1:many-to-many}\"$0"),
("fieldtype=\"many-to-one\"\tfieldtype", "fieldtype=\"${1:many-to-one}\"$0"),
("fieldtype=\"collection\"\tfieldtype", "fieldtype=\"${1:collection}\"$0"),
("fieldtype=\"timestamp\"\tfieldtype", "fieldtype=\"${1:timestamp}\"$0"),
("fieldtype=\"version\"\tfieldtype", "fieldtype=\"${1:version}\"$0"),
("ormType\t@ormType", "ormType=\"$1\"$0"),
("ormType=\"string\"\tormType", "ormType=\"${1:string}\"$0"),
("ormType=\"character\"\tormType", "ormType=\"${1:character}\"$0"),
("ormType=\"char\"\tormType", "ormType=\"${1:char}\"$0"),
("ormType=\"short\"\tormType", "ormType=\"${1:short}\"$0"),
("ormType=\"integer\"\tormType", "ormType=\"${1:integer}\"$0"),
("ormType=\"int\"\tormType", "ormType=\"${1:int}\"$0"),
("ormType=\"long\"\tormType", "ormType=\"${1:long}\"$0"),
("ormType=\"big_decimal\"\tormType", "ormType=\"${1:big_decimal}\"$0"),
("ormType=\"float\"\tormType", "ormType=\"${1:float}\"$0"),
("ormType=\"double\"\tormType", "ormType=\"${1:double}\"$0"),
("ormType=\"boolean\"\tormType", "ormType=\"${1:boolean}\"$0"),
("ormType=\"yes_no\"\tormType", "ormType=\"${1:yes_no}\"$0"),
("ormType=\"true_false\"\tormType", "ormType=\"${1:true_false}\"$0"),
("ormType=\"text\"\tormType", "ormType=\"${1:text}\"$0"),
("ormType=\"date\"\tormType", "ormType=\"${1:date}\"$0"),
("ormType=\"timestamp\"\tormType", "ormType=\"${1:timestamp}\"$0"),
("ormType=\"binary\"\tormType", "ormType=\"${1:binary}\"$0"),
("ormType=\"serializable\"\tormType", "ormType=\"${1:serializable}\"$0"),
("ormType=\"blob\"\tormType", "ormType=\"${1:blob}\"$0"),
("ormType=\"clob\"\tormType", "ormType=\"${1:clob}\"$0"),
("column\t@column", "column=\"$1\"$0"),
("generator\t@generator", "generator=\"$1\"$0"),
("generator=\"increment\"\tgenerator", "generator=\"${1:increment}\"$0"),
("generator=\"identity\"\tgenerator", "generator=\"${1:identity}\"$0"),
("generator=\"sequence\"\tgenerator", "generator=\"${1:sequence}\"$0"),
("generator=\"seqhilo\"\tgenerator", "generator=\"${1:seqhilo}\"$0"),
("generator=\"uuid\"\tgenerator", "generator=\"${1:uuid}\"$0"),
("generator=\"guid\"\tgenerator", "generator=\"${1:guid}\"$0"),
("generator=\"native\"\tgenerator", "generator=\"${1:native}\"$0"),
("generator=\"assigned\"\tgenerator", "generator=\"${1:assigned}\"$0"),
("generator=\"select\"\tgenerator", "generator=\"${1:select}\"$0"),
("generator=\"foreign\"\tgenerator", "generator=\"${1:foreign}\"$0"),
("generator=\"sequence-indentity\"\tgenerator", "generator=\"${1:sequence-indentity}\"$0"),
("sequence\t@sequence", "sequence=\"$1\"$0"),
("selectkey\t@selectkey", "selectkey=\"$1\"$0"),
("params\t@params", "params=\"$1\"$0"),
("length\t@length", "length=\"$1\"$0"),
("precision\t@precision", "precision=\"$1\"$0"),
("index\t@index", "index=\"$1\"$0"),
("setter\t@setter", "setter=\"$1\"$0"),
("setter=\"true\"\tsetter", "setter=\"${1:true}\"$0"),
("setter=\"false\"\tsetter", "setter=\"${1:false}\"$0"),
("getter\t@getter", "getter=\"$1\"$0"),
("getter=\"true\"\tgetter", "getter=\"${1:true}\"$0"),
("getter=\"false\"\tgetter", "getter=\"${1:false}\"$0"),
("source\t@source", "source=\"$1\"$0"),
("source=\"vm\"\tsource", "source=\"${1:vm}\"$0"),
("source=\"db\"\tsource", "source=\"${1:db}\"$0"),
("elementcolumn\t@elementcolumn", "elementcolumn=\"$1\"$0"),
("elementtype\t@elementtype", "elementtype=\"$1\"$0"),
("elementtype=\"string\"\telementtype", "elementtype=\"${1:string}\"$0"),
("elementtype=\"character\"\telementtype", "elementtype=\"${1:character}\"$0"),
("elementtype=\"char\"\telementtype", "elementtype=\"${1:char}\"$0"),
("elementtype=\"short\"\telementtype", "elementtype=\"${1:short}\"$0"),
("elementtype=\"integer\"\telementtype", "elementtype=\"${1:integer}\"$0"),
("elementtype=\"int\"\telementtype", "elementtype=\"${1:int}\"$0"),
("elementtype=\"long\"\telementtype", "elementtype=\"${1:long}\"$0"),
("elementtype=\"big_decimal\"\telementtype", "elementtype=\"${1:big_decimal}\"$0"),
("elementtype=\"float\"\telementtype", "elementtype=\"${1:float}\"$0"),
("elementtype=\"double\"\telementtype", "elementtype=\"${1:double}\"$0"),
("elementtype=\"boolean\"\telementtype", "elementtype=\"${1:boolean}\"$0"),
("elementtype=\"yes_no\"\telementtype", "elementtype=\"${1:yes_no}\"$0"),
("elementtype=\"true_false\"\telementtype", "elementtype=\"${1:true_false}\"$0"),
("elementtype=\"text\"\telementtype", "elementtype=\"${1:text}\"$0"),
("elementtype=\"date\"\telementtype", "elementtype=\"${1:date}\"$0"),
("elementtype=\"timestamp\"\telementtype", "elementtype=\"${1:timestamp}\"$0"),
("elementtype=\"binary\"\telementtype", "elementtype=\"${1:binary}\"$0"),
("elementtype=\"serializable\"\telementtype", "elementtype=\"${1:serializable}\"$0"),
("elementtype=\"blob\"\telementtype", "elementtype=\"${1:blob}\"$0"),
("elementtype=\"clob\"\telementtype", "elementtype=\"${1:clob}\"$0"),
("structkeytype\t@structkeytype", "structkeytype=\"$1\"$0"),
("structkeytype=\"string\"\tstructkeytype", "structkeytype=\"${1:string}\"$0"),
("structkeytype=\"character\"\tstructkeytype", "structkeytype=\"${1:character}\"$0"),
("structkeytype=\"char\"\tstructkeytype", "structkeytype=\"${1:char}\"$0"),
("structkeytype=\"short\"\tstructkeytype", "structkeytype=\"${1:short}\"$0"),
("structkeytype=\"integer\"\tstructkeytype", "structkeytype=\"${1:integer}\"$0"),
("structkeytype=\"int\"\tstructkeytype", "structkeytype=\"${1:int}\"$0"),
("structkeytype=\"long\"\tstructkeytype", "structkeytype=\"${1:long}\"$0"),
("structkeytype=\"big_decimal\"\tstructkeytype", "structkeytype=\"${1:big_decimal}\"$0"),
("structkeytype=\"float\"\tstructkeytype", "structkeytype=\"${1:float}\"$0"),
("structkeytype=\"double\"\tstructkeytype", "structkeytype=\"${1:double}\"$0"),
("structkeytype=\"boolean\"\tstructkeytype", "structkeytype=\"${1:boolean}\"$0"),
("structkeytype=\"yes_no\"\tstructkeytype", "structkeytype=\"${1:yes_no}\"$0"),
("structkeytype=\"true_false\"\tstructkeytype", "structkeytype=\"${1:true_false}\"$0"),
("structkeytype=\"text\"\tstructkeytype", "structkeytype=\"${1:text}\"$0"),
("structkeytype=\"date\"\tstructkeytype", "structkeytype=\"${1:date}\"$0"),
("structkeytype=\"timestamp\"\tstructkeytype", "structkeytype=\"${1:timestamp}\"$0"),
("structkeytype=\"binary\"\tstructkeytype", "structkeytype=\"${1:binary}\"$0"),
("structkeytype=\"serializable\"\tstructkeytype", "structkeytype=\"${1:serializable}\"$0"),
("structkeytype=\"blob\"\tstructkeytype", "structkeytype=\"${1:blob}\"$0"),
("structkeytype=\"clob\"\tstructkeytype", "structkeytype=\"${1:clob}\"$0"),
("structkeycolumn\t@structkeycolumn", "structkeycolumn=\"$1\"$0"),
("inversejoincolumn\t@inversejoincolumn", "inversejoincolumn=\"$1\"$0"),
("linkschema\t@linkschema", "linkschema=\"$1\"$0"),
("linkcatalog\t@linkcatalog", "linkcatalog=\"$1\"$0"),
("linktable\t@linktable", "linktable=\"$1\"$0"),
("missingRowIgnored\t@missingRowIgnored", "missingRowIgnored=\"$1\"$0"),
("missingRowIgnored=\"true\"\tmissingRowIgnored", "missingRowIgnored=\"${1:true}\"$0"),
("missingRowIgnored=\"false\"\tmissingRowIgnored", "missingRowIgnored=\"${1:false}\"$0"),
("inverse\t@inverse", "inverse=\"$1\"$0"),
("inverse=\"true\"\tinverse", "inverse=\"${1:true}\"$0"),
("inverse=\"false\"\tinverse", "inverse=\"${1:false}\"$0"),
("orderby\t@orderby", "orderby=\"$1\"$0"),
("fkcolumn\t@fkcolumn", "fkcolumn=\"$1\"$0"),
("fetch\t@fetch", "fetch=\"$1\"$0"),
("fetch=\"join\"\tfetch", "fetch=\"${1:join}\"$0"),
("fetch=\"select\"\tfetch", "fetch=\"${1:select}\"$0"),
("cascade\t@cascade", "cascade=\"$1\"$0"),
("cascade=\"all\"\tcascade", "cascade=\"${1:all}\"$0"),
("cascade=\"none\"\tcascade", "cascade=\"${1:none}\"$0"),
("cascade=\"save-update\"\tcascade", "cascade=\"${1:save-update}\"$0"),
("cascade=\"delete\"\tcascade", "cascade=\"${1:delete}\"$0"),
("cascade=\"all-delete-orphan\"\tcascade", "cascade=\"${1:all-delete-orphan}\"$0"),
("cascade=\"delete-orphan\"\tcascade", "cascade=\"${1:delete-orphan}\"$0"),
("cascade=\"create\"\tcascade", "cascade=\"${1:create}\"$0"),
("cascade=\"merge\"\tcascade", "cascade=\"${1:merge}\"$0"),
("cascade=\"lock\"\tcascade", "cascade=\"${1:lock}\"$0"),
("cascade=\"refresh\"\tcascade", "cascade=\"${1:refresh}\"$0"),
("cascade=\"evict\"\tcascade", "cascade=\"${1:evict}\"$0"),
("cascade=\"replicate\"\tcascade", "cascade=\"${1:replicate}\"$0"),
("constrained\t@constrained", "constrained=\"$1\"$0"),
("constrained=\"true\"\tconstrained", "constrained=\"${1:true}\"$0"),
("constrained=\"false\"\tconstrained", "constrained=\"${1:false}\"$0"),
("unique\t@unique", "unique=\"$1\"$0"),
("unique=\"true\"\tunique", "unique=\"${1:true}\"$0"),
("unique=\"false\"\tunique", "unique=\"${1:false}\"$0"),
("uniquekey\t@uniquekey", "uniquekey=\"$1\"$0"),
("notnull\t@notnull", "notnull=\"$1\"$0"),
("notnull=\"true\"\tnotnull", "notnull=\"${1:true}\"$0"),
("notnull=\"false\"\tnotnull", "notnull=\"${1:false}\"$0"),
("update\t@update", "update=\"$1\"$0"),
("update=\"true\"\tupdate", "update=\"${1:true}\"$0"),
("update=\"false\"\tupdate", "update=\"${1:false}\"$0"),
("insert\t@insert", "insert=\"$1\"$0"),
("insert=\"true\"\tinsert", "insert=\"${1:true}\"$0"),
("insert=\"false\"\tinsert", "insert=\"${1:false}\"$0"),
("generated\t@generated", "generated=\"$1\"$0"),
("generated=\"never\"\tgenerated", "generated=\"${1:never}\"$0"),
("generated=\"insert\"\tgenerated", "generated=\"${1:insert}\"$0"),
("generated=\"always\"\tgenerated", "generated=\"${1:always}\"$0"),
("formula\t@formula", "formula=\"$1\"$0"),
("lazy\t@lazy", "lazy=\"$1\"$0"),
("lazy=\"true\"\tlazy", "lazy=\"${1:true}\"$0"),
("lazy=\"false\"\tlazy", "lazy=\"${1:false}\"$0"),
("lazy=\"extra\"\tlazy", "lazy=\"${1:extra}\"$0"),
("optimisticLock\t@optimisticLock", "optimisticLock=\"$1\"$0"),
("optimisticLock=\"true\"\toptimisticLock", "optimisticLock=\"${1:true}\"$0"),
("optimisticLock=\"false\"\toptimisticLock", "optimisticLock=\"${1:false}\"$0"),
("scale\t@scale", "scale=\"$1\"$0"),
("mappedby\t@mappedby", "mappedby=\"$1\"$0"),
("cfc\t@cfc", "cfc=\"$1\"$0"),
("joinColumn\t@joinColumn", "joinColumn=\"$1\"$0"),
("validate\t@validate", "validate=\"$1\"$0"),
("validate=\"string\"\tvalidate", "validate=\"${1:string}\"$0"),
("validate=\"boolean\"\tvalidate", "validate=\"${1:boolean}\"$0"),
("validate=\"integer\"\tvalidate", "validate=\"${1:integer}\"$0"),
("validate=\"numeric\"\tvalidate", "validate=\"${1:numeric}\"$0"),
("validate=\"date\"\tvalidate", "validate=\"${1:date}\"$0"),
("validate=\"time\"\tvalidate", "validate=\"${1:time}\"$0"),
("validate=\"creditcard\"\tvalidate", "validate=\"${1:creditcard}\"$0"),
("validate=\"email\"\tvalidate", "validate=\"${1:email}\"$0"),
("validate=\"eurodate\"\tvalidate", "validate=\"${1:eurodate}\"$0"),
("validate=\"regex\"\tvalidate", "validate=\"${1:regex}\"$0"),
("validate=\"ssn\"\tvalidate", "validate=\"${1:ssn}\"$0"),
("validate=\"telephone\"\tvalidate", "validate=\"${1:telephone}\"$0"),
("validate=\"UUID\"\tvalidate", "validate=\"${1:UUID}\"$0"),
("validate=\"guid\"\tvalidate", "validate=\"${1:guid}\"$0"),
("validate=\"zipcode\"\tvalidate", "validate=\"${1:zipcode}\"$0"),
("validateParams\t@validateParams", "validateParams=\"$1\"$0"),
("cacheUse\t@cacheUse", "cacheUse=\"$1\"$0"),
("cacheUse=\"read-only\"\tcacheUse", "cacheUse=\"${1:read-only}\"$0"),
("cacheUse=\"nonstrict-read-write\"\tcacheUse", "cacheUse=\"${1:nonstrict-read-write}\"$0"),
("cacheUse=\"read-write\"\tcacheUse", "cacheUse=\"${1:read-write}\"$0"),
("cacheUse=\"transactional\"\tcacheUse", "cacheUse=\"${1:transactional}\"$0"),
("sqlType\t@sqlType", "sqlType=\"$1\"$0"),
("dbDefault\t@dbDefault", "dbDefault=\"$1\"$0"),
("where\t@where", "where=\"$1\"$0"),
("persistent\t@persistent", "persistent=\"$1\"$0"),
("persistent=\"true\"\tpersistent", "persistent=\"${1:true}\"$0"),
("persistent=\"false\"\tpersistent", "persistent=\"${1:false}\"$0"),
("unSavedValue\t@unSavedValue", "unSavedValue=\"$1\"$0"),
("serializable\t@serializable", "serializable=\"$1\"$0"),
("serializable=\"true\"\tserializable", "serializable=\"${1:true}\"$0"),
("serializable=\"false\"\tserializable", "serializable=\"${1:false}\"$0"),
("singularname\t@singularname", "singularname=\"$1\"$0"),
("remotingFetch\t@remotingFetch", "remotingFetch=\"$1\"$0"),
("remotingFetch=\"true\"\tremotingFetch", "remotingFetch=\"${1:true}\"$0"),
("remotingFetch=\"false\"\tremotingFetch", "remotingFetch=\"${1:false}\"$0"),
("table\t@table", "table=\"$1\"$0"),
("indexBoost\t@indexBoost", "indexBoost=\"$1\"$0"),
("indexTokenize\t@indexTokenize", "indexTokenize=\"$1\"$0"),
("indexTokenize=\"true\"\tindexTokenize", "indexTokenize=\"${1:true}\"$0"),
("indexTokenize=\"false\"\tindexTokenize", "indexTokenize=\"${1:false}\"$0"),
("indexStore\t@indexStore", "indexStore=\"$1\"$0"),
("indexStore=\"true\"\tindexStore", "indexStore=\"${1:true}\"$0"),
("indexStore=\"false\"\tindexStore", "indexStore=\"${1:false}\"$0"),
("indexStore=\"compressed\"\tindexStore", "indexStore=\"${1:compressed}\"$0"),
("indexFieldName\t@indexFieldName", "indexFieldName=\"$1\"$0"),
("indexable\t@indexable", "indexable=\"$1\"$0"),
("indexable=\"true\"\tindexable", "indexable=\"${1:true}\"$0"),
("indexable=\"false\"\tindexable", "indexable=\"${1:false}\"$0"),
("indexLanguage\t@indexLanguage", "indexLanguage=\"$1\"$0")
]
attributes["param"] = [
("name\t@name", "name=\"$1\"$0"),
("type\t@type", "type=\"$1\"$0"),
("type=\"any\"\ttype", "type=\"${1:any}\"$0"),
("type=\"array\"\ttype", "type=\"${1:array}\"$0"),
("type=\"binary\"\ttype", "type=\"${1:binary}\"$0"),
("type=\"boolean\"\ttype", "type=\"${1:boolean}\"$0"),
("type=\"creditcard\"\ttype", "type=\"${1:creditcard}\"$0"),
("type=\"date\"\ttype", "type=\"${1:date}\"$0"),
("type=\"time\"\ttype", "type=\"${1:time}\"$0"),
("type=\"email\"\ttype", "type=\"${1:email}\"$0"),
("type=\"eurodate\"\ttype", "type=\"${1:eurodate}\"$0"),
("type=\"float\"\ttype", "type=\"${1:float}\"$0"),
("type=\"numeric\"\ttype", "type=\"${1:numeric}\"$0"),
("type=\"guid\"\ttype", "type=\"${1:guid}\"$0"),
("type=\"integer\"\ttype", "type=\"${1:integer}\"$0"),
("type=\"query\"\ttype", "type=\"${1:query}\"$0"),
("type=\"range\"\ttype", "type=\"${1:range}\"$0"),
("type=\"regex\"\ttype", "type=\"${1:regex}\"$0"),
("type=\"regular_expression\"\ttype", "type=\"${1:regular_expression}\"$0"),
("type=\"ssn\"\ttype", "type=\"${1:ssn}\"$0"),
("type=\"social_security_number\"\ttype", "type=\"${1:social_security_number}\"$0"),
("type=\"string\"\ttype", "type=\"${1:string}\"$0"),
("type=\"struct\"\ttype", "type=\"${1:struct}\"$0"),
("type=\"telephone\"\ttype", "type=\"${1:telephone}\"$0"),
("type=\"url\"\ttype", "type=\"${1:url}\"$0"),
("type=\"uuid\"\ttype", "type=\"${1:uuid}\"$0"),
("type=\"usdate\"\ttype", "type=\"${1:usdate}\"$0"),
("type=\"variablename\"\ttype", "type=\"${1:variablename}\"$0"),
("type=\"xml\"\ttype", "type=\"${1:xml}\"$0"),
("type=\"zipcode\"\ttype", "type=\"${1:zipcode}\"$0"),
("default\t@default", "default=\"$1\"$0"),
("max\t@max", "max=\"$1\"$0"),
("min\t@min", "min=\"$1\"$0"),
("pattern\t@pattern", "pattern=\"$1\"$0"),
("maxlength\t@maxlength", "maxlength=\"$1\"$0")
]
attributes["http"] = [
("url\t@url", "url=\"$1\"$0"),
("port\t@port", "port=\"$1\"$0"),
("method\t@method", "method=\"$1\"$0"),
("method=\"get\"\tmethod", "method=\"${1:get}\"$0"),
("method=\"post\"\tmethod", "method=\"${1:post}\"$0"),
("method=\"put\"\tmethod", "method=\"${1:put}\"$0"),
("method=\"delete\"\tmethod", "method=\"${1:delete}\"$0"),
("method=\"head\"\tmethod", "method=\"${1:head}\"$0"),
("method=\"trace\"\tmethod", "method=\"${1:trace}\"$0"),
("method=\"options\"\tmethod", "method=\"${1:options}\"$0"),
("proxyserver\t@proxyserver", "proxyserver=\"$1\"$0"),
("proxyport\t@proxyport", "proxyport=\"$1\"$0"),
("proxyuser\t@proxyuser", "proxyuser=\"$1\"$0"),
("proxypassword\t@proxypassword", "proxypassword=\"$1\"$0"),
("username\t@username", "username=\"$1\"$0"),
("password\t@password", "password=\"$1\"$0"),
("useragent\t@useragent", "useragent=\"$1\"$0"),
("charset\t@charset", "charset=\"$1\"$0"),
("charset=\"utf-8\"\tcharset", "charset=\"${1:utf-8}\"$0"),
("charset=\"iso-8859-1\"\tcharset", "charset=\"${1:iso-8859-1}\"$0"),
("charset=\"windows-1252\"\tcharset", "charset=\"${1:windows-1252}\"$0"),
("charset=\"us-ascii\"\tcharset", "charset=\"${1:us-ascii}\"$0"),
("charset=\"shift_jis\"\tcharset", "charset=\"${1:shift_jis}\"$0"),
("charset=\"iso-2022-jp\"\tcharset", "charset=\"${1:iso-2022-jp}\"$0"),
("charset=\"euc-jp\"\tcharset", "charset=\"${1:euc-jp}\"$0"),
("charset=\"euc-kr\"\tcharset", "charset=\"${1:euc-kr}\"$0"),
("charset=\"big5\"\tcharset", "charset=\"${1:big5}\"$0"),
("charset=\"euc-cn\"\tcharset", "charset=\"${1:euc-cn}\"$0"),
("charset=\"utf-16\"\tcharset", "charset=\"${1:utf-16}\"$0"),
("resolveurl\t@resolveurl", "resolveurl=\"$1\"$0"),
("resolveurl=\"true\"\tresolveurl", "resolveurl=\"${1:true}\"$0"),
("resolveurl=\"false\"\tresolveurl", "resolveurl=\"${1:false}\"$0"),
("throwonerror\t@throwonerror", "throwonerror=\"$1\"$0"),
("throwonerror=\"true\"\tthrowonerror", "throwonerror=\"${1:true}\"$0"),
("throwonerror=\"false\"\tthrowonerror", "throwonerror=\"${1:false}\"$0"),
("redirect\t@redirect", "redirect=\"$1\"$0"),
("redirect=\"true\"\tredirect", "redirect=\"${1:true}\"$0"),
("redirect=\"false\"\tredirect", "redirect=\"${1:false}\"$0"),
("timeout\t@timeout", "timeout=\"$1\"$0"),
("getasbinary\t@getasbinary", "getasbinary=\"$1\"$0"),
("getasbinary=\"auto\"\tgetasbinary", "getasbinary=\"${1:auto}\"$0"),
("getasbinary=\"yes\"\tgetasbinary", "getasbinary=\"${1:yes}\"$0"),
("getasbinary=\"no\"\tgetasbinary", "getasbinary=\"${1:no}\"$0"),
("getasbinary=\"never\"\tgetasbinary", "getasbinary=\"${1:never}\"$0"),
("result\t@result", "result=\"$1\"$0"),
("delimiter\t@delimiter", "delimiter=\"$1\"$0"),
("delimiter=\",\"\tdelimiter", "delimiter=\"${1:,}\"$0"),
("delimiter=\";\"\tdelimiter", "delimiter=\"${1:;}\"$0"),
("delimiter=\"|\"\tdelimiter", "delimiter=\"${1:|}\"$0"),
("delimiter=\":\"\tdelimiter", "delimiter=\"${1::}\"$0"),
("name\t@name", "name=\"$1\"$0"),
("columns\t@columns", "columns=\"$1\"$0"),
("firstrowasheaders\t@firstrowasheaders", "firstrowasheaders=\"$1\"$0"),
("firstrowasheaders=\"true\"\tfirstrowasheaders", "firstrowasheaders=\"${1:true}\"$0"),
("firstrowasheaders=\"false\"\tfirstrowasheaders", "firstrowasheaders=\"${1:false}\"$0"),
("textqualifier\t@textqualifier", "textqualifier=\"$1\"$0"),
("textqualifier=\"\"\ttextqualifier", "textqualifier=\"${1:}\"$0"),
("textqualifier=\"'\"\ttextqualifier", "textqualifier=\"${1:'}\"$0"),
("file\t@file", "file=\"$1\"$0"),
("multipart\t@multipart", "multipart=\"$1\"$0"),
("multipart=\"true\"\tmultipart", "multipart=\"${1:true}\"$0"),
("multipart=\"false\"\tmultipart", "multipart=\"${1:false}\"$0"),
("clientcertpassword\t@clientcertpassword", "clientcertpassword=\"$1\"$0"),
("path\t@path", "path=\"$1\"$0"),
("clientcert\t@clientcert", "clientcert=\"$1\"$0"),
("compression\t@compression", "compression=\"$1\"$0"),
("multiparttype\t@multiparttype", "multiparttype=\"$1\"$0")
]
attributes["httpparam"] = [
("name\t@name", "name=\"$1\"$0"),
("value\t@value", "value=\"$1\"$0"),
("file\t@file", "file=\"$1\"$0"),
("type\t@type", "type=\"$1\"$0"),
("type=\"header\"\ttype", "type=\"${1:header}\"$0"),
("type=\"body\"\ttype", "type=\"${1:body}\"$0"),
("type=\"xml\"\ttype", "type=\"${1:xml}\"$0"),
("type=\"cgi\"\ttype", "type=\"${1:cgi}\"$0"),
("type=\"file\"\ttype", "type=\"${1:file}\"$0"),
("type=\"url\"\ttype", "type=\"${1:url}\"$0"),
("type=\"formfield\"\ttype", "type=\"${1:formfield}\"$0"),
("type=\"cookie\"\ttype", "type=\"${1:cookie}\"$0"),
("encoded\t@encoded", "encoded=\"$1\"$0"),
("encoded=\"true\"\tencoded", "encoded=\"${1:true}\"$0"),
("encoded=\"false\"\tencoded", "encoded=\"${1:false}\"$0"),
("mimetype\t@mimetype", "mimetype=\"$1\"$0"),
("mimetype=\"text/plain\"\tmimetype", "mimetype=\"${1:text/plain}\"$0"),
("mimetype=\"text/html\"\tmimetype", "mimetype=\"${1:text/html}\"$0")
]
SUBLIME_SETTINGS = sublime.load_settings('Preferences.sublime-settings')
class TagOperatorComplete(sublime_plugin.EventListener):
def on_query_completions(self, view, prefix, locations):
completions = []
if not view.match_selector(locations[0], "\
source.cfscript -meta -string -text -source.sql, \
source.cfscript.embedded.cfml -meta -string"):
return []
sel = view.sel()[0]
if view.substr(sel.begin() - 1) == ".":
return []
for s in attributes.keys():
completions.extend([(s.split(" ")[0] + "\tTagOp. (cfscript)",s)])
return sorted(completions)
class TagOperatorAttributeComplete(sublime_plugin.EventListener):
valid_scopes_operators = ["meta.operator"]
def on_modified(self, view):
if not SUBLIME_SETTINGS.get("auto_complete"):
return
sel = view.sel()[0].a
if any(s in view.scope_name(sel) for s in self.valid_scopes_operators):
if view.substr(sel - 1) == " ":
t = view.settings().get("auto_complete_delay")
sublime.set_timeout(lambda:
view.run_command("auto_complete", {
'disable_auto_insert': True,
'next_completion_if_showing': False,
'api_completions_only': True}), t)
def on_query_completions(self, view, prefix, locations):
# make sure we're in a tag operator attribute scope and not in an attribute string
if not any(s in view.scope_name(locations[0]) for s in self.valid_scopes_operators) or \
"string" in view.scope_name(locations[0]):
return []
opdata = view.substr(sublime.Region(0, locations[0])).split("\n")
opdata = opdata.pop().split(" ")
opdata = filter (lambda a: a != "", opdata)
if opdata[0] in attributes.keys():
return attributes[opdata[0]]
return []