File tree Expand file tree Collapse file tree 6 files changed +301
-5
lines changed
data/fixtures/scopes/java
packages/common/src/scopeSupportFacets Expand file tree Collapse file tree 6 files changed +301
-5
lines changed Original file line number Diff line number Diff line change
1
+ public class MyClass {
2
+ String foo, bar;
3
+ }
4
+ ---
5
+
6
+ [#1 Range] = 1:4-1:20
7
+ >----------------<
8
+ 1| String foo, bar;
9
+
10
+ [#1 Domain] = 0:22-2:0
11
+ >
12
+ 0| public class MyClass {
13
+ 1| String foo, bar;
14
+ 2| }
15
+ <
16
+
17
+
18
+ [#2 Range] = 1:4-1:20
19
+ >----------------<
20
+ 1| String foo, bar;
21
+
22
+ [#2 Domain] = 1:0-1:20
23
+ >--------------------<
24
+ 1| String foo, bar;
25
+
26
+
27
+ [#3 Range] = 1:11-1:19
28
+ >--------<
29
+ 1| String foo, bar;
30
+
31
+ [#3 Domain] = 1:4-1:20
32
+ >----------------<
33
+ 1| String foo, bar;
Original file line number Diff line number Diff line change
1
+ public class MyClass {
2
+ public void myFunk() {
3
+ String foo, bar;
4
+ }
5
+ }
6
+ ---
7
+
8
+ [#1 Range] = 1:4-3:5
9
+ >----------------------
10
+ 1| public void myFunk() {
11
+ 2| String foo, bar;
12
+ 3| }
13
+ -----<
14
+
15
+ [#1 Domain] = 0:22-4:0
16
+ >
17
+ 0| public class MyClass {
18
+ 1| public void myFunk() {
19
+ 2| String foo, bar;
20
+ 3| }
21
+ 4| }
22
+ <
23
+
24
+
25
+ [#2 Range] =
26
+ [#2 Domain] = 1:23-1:23
27
+ ><
28
+ 1| public void myFunk() {
29
+
30
+
31
+ [#3 Range] = 2:8-2:24
32
+ >----------------<
33
+ 2| String foo, bar;
34
+
35
+ [#3 Domain] = 1:26-3:4
36
+ >
37
+ 1| public void myFunk() {
38
+ 2| String foo, bar;
39
+ 3| }
40
+ ----<
41
+
42
+
43
+ [#4 Range] = 2:8-2:24
44
+ >----------------<
45
+ 2| String foo, bar;
46
+
47
+ [#4 Domain] = 2:0-2:24
48
+ >------------------------<
49
+ 2| String foo, bar;
50
+
51
+
52
+ [#5 Range] = 2:15-2:23
53
+ >--------<
54
+ 2| String foo, bar;
55
+
56
+ [#5 Domain] = 2:8-2:24
57
+ >----------------<
58
+ 2| String foo, bar;
Original file line number Diff line number Diff line change
1
+ public class MyClass {
2
+ String foo, bar;
3
+ }
4
+ ---
5
+
6
+ [#1 Content] =
7
+ [#1 Domain] = 1:4-1:14
8
+ >----------<
9
+ 1| String foo, bar;
10
+
11
+ [#1 Removal] = 1:4-1:16
12
+ >------------<
13
+ 1| String foo, bar;
14
+
15
+ [#1 Trailing delimiter] = 1:14-1:16
16
+ >--<
17
+ 1| String foo, bar;
18
+
19
+ [#1 Insertion delimiter] = ",\n"
20
+
21
+
22
+ [#2 Content] =
23
+ [#2 Domain] = 1:11-1:14
24
+ >---<
25
+ 1| String foo, bar;
26
+
27
+ [#2 Removal] = 1:11-1:16
28
+ >-----<
29
+ 1| String foo, bar;
30
+
31
+ [#2 Trailing delimiter] = 1:14-1:16
32
+ >--<
33
+ 1| String foo, bar;
34
+
35
+ [#2 Insertion delimiter] = ", "
36
+
37
+
38
+ [#3 Content] =
39
+ [#3 Domain] = 1:16-1:19
40
+ >---<
41
+ 1| String foo, bar;
42
+
43
+ [#3 Removal] = 1:14-1:19
44
+ >-----<
45
+ 1| String foo, bar;
46
+
47
+ [#3 Leading delimiter] = 1:14-1:16
48
+ >--<
49
+ 1| String foo, bar;
50
+
51
+ [#3 Insertion delimiter] = ", "
52
+
53
+
54
+ [#4 Content] =
55
+ [#4 Domain] = 1:16-1:20
56
+ >----<
57
+ 1| String foo, bar;
58
+
59
+ [#4 Removal] = 1:14-1:20
60
+ >------<
61
+ 1| String foo, bar;
62
+
63
+ [#4 Leading delimiter] = 1:14-1:16
64
+ >--<
65
+ 1| String foo, bar;
66
+
67
+ [#4 Insertion delimiter] = ",\n"
Original file line number Diff line number Diff line change
1
+ public class MyClass {
2
+ public void myFunk() {
3
+ String foo, bar;
4
+ }
5
+ }
6
+ ---
7
+
8
+ [#1 Content] =
9
+ [#1 Domain] = 1:4-3:5
10
+ >----------------------
11
+ 1| public void myFunk() {
12
+ 2| String foo, bar;
13
+ 3| }
14
+ -----<
15
+
16
+ [#1 Removal] = 1:0-3:5
17
+ >--------------------------
18
+ 1| public void myFunk() {
19
+ 2| String foo, bar;
20
+ 3| }
21
+ -----<
22
+
23
+ [#1 Leading delimiter] = 1:0-1:4
24
+ >----<
25
+ 1| public void myFunk() {
26
+
27
+ [#1 Insertion delimiter] = ",\n"
28
+
29
+
30
+ [#2 Content] =
31
+ [#2 Domain] = 2:8-2:18
32
+ >----------<
33
+ 2| String foo, bar;
34
+
35
+ [#2 Removal] = 2:8-2:20
36
+ >------------<
37
+ 2| String foo, bar;
38
+
39
+ [#2 Trailing delimiter] = 2:18-2:20
40
+ >--<
41
+ 2| String foo, bar;
42
+
43
+ [#2 Insertion delimiter] = ",\n"
44
+
45
+
46
+ [#3 Content] =
47
+ [#3 Domain] = 2:15-2:18
48
+ >---<
49
+ 2| String foo, bar;
50
+
51
+ [#3 Removal] = 2:15-2:20
52
+ >-----<
53
+ 2| String foo, bar;
54
+
55
+ [#3 Trailing delimiter] = 2:18-2:20
56
+ >--<
57
+ 2| String foo, bar;
58
+
59
+ [#3 Insertion delimiter] = ", "
60
+
61
+
62
+ [#4 Content] =
63
+ [#4 Domain] = 2:20-2:23
64
+ >---<
65
+ 2| String foo, bar;
66
+
67
+ [#4 Removal] = 2:18-2:23
68
+ >-----<
69
+ 2| String foo, bar;
70
+
71
+ [#4 Leading delimiter] = 2:18-2:20
72
+ >--<
73
+ 2| String foo, bar;
74
+
75
+ [#4 Insertion delimiter] = ", "
76
+
77
+
78
+ [#5 Content] =
79
+ [#5 Domain] = 2:20-2:24
80
+ >----<
81
+ 2| String foo, bar;
82
+
83
+ [#5 Removal] = 2:18-2:24
84
+ >------<
85
+ 2| String foo, bar;
86
+
87
+ [#5 Leading delimiter] = 2:18-2:20
88
+ >--<
89
+ 2| String foo, bar;
90
+
91
+ [#5 Insertion delimiter] = ",\n"
Original file line number Diff line number Diff line change @@ -21,14 +21,17 @@ export const javaScopeSupport: LanguageScopeSupportFacetMap = {
21
21
"argument.actual" : supported ,
22
22
"argument.actual.iteration" : supported ,
23
23
24
- element : notApplicable ,
25
- tags : notApplicable ,
26
- attribute : notApplicable ,
27
- "key.attribute" : notApplicable ,
28
- "value.attribute" : notApplicable ,
24
+ "collectionItem.unenclosed" : supported ,
25
+ "collectionItem.unenclosed.iteration" : supported ,
29
26
30
27
"branch.if" : supported ,
31
28
"branch.if.iteration" : supported ,
32
29
"branch.try" : supported ,
33
30
"branch.try.iteration" : supported ,
31
+
32
+ element : notApplicable ,
33
+ tags : notApplicable ,
34
+ attribute : notApplicable ,
35
+ "key.attribute" : notApplicable ,
36
+ "value.attribute" : notApplicable ,
34
37
} ;
Original file line number Diff line number Diff line change 316
316
value: (_)? @value @name.trailing.startOf
317
317
)
318
318
) @_.domain
319
+
319
320
(field_declaration
320
321
(variable_declarator
321
322
name: (_) @name @value.leading.endOf
322
323
value: (_)? @value @name.trailing.startOf
323
324
)
324
325
) @_.domain
325
326
327
+ ; ;!! int foo, bar;
328
+ ; ;! ^^^ ^^^
329
+ (
330
+ (local_variable_declaration
331
+ type: (_)
332
+ (variable_declarator)? @_.leading.endOf
333
+ .
334
+ (variable_declarator) @collectionItem
335
+ .
336
+ (variable_declarator)? @_.trailing.startOf
337
+ )
338
+ (#insertion-delimiter! @collectionItem " , " )
339
+ )
340
+
341
+ (
342
+ (field_declaration
343
+ type: (_)
344
+ (variable_declarator)? @_.leading.endOf
345
+ .
346
+ (variable_declarator) @collectionItem
347
+ .
348
+ (variable_declarator)? @_.trailing.startOf
349
+ )
350
+ (#insertion-delimiter! @collectionItem " , " )
351
+ )
352
+
353
+ ; ;!! int foo, bar;
354
+ ; ;! ^^^^^^^^
355
+ ; ;! -------------
356
+ (local_variable_declaration
357
+ type: (_)
358
+ .
359
+ (_) @collectionItem.iteration.start.startOf
360
+ " ;" ? @collectionItem.iteration.end.startOf
361
+ ) @collectionItem.iteration.domain
362
+
363
+ (field_declaration
364
+ type: (_)
365
+ .
366
+ (_) @collectionItem.iteration.start.startOf
367
+ " ;" ? @collectionItem.iteration.end.startOf
368
+ ) @collectionItem.iteration.domain
369
+
326
370
; ;!! value = 1;
327
371
; ;! ^
328
372
; ;! xxxx
You can’t perform that action at this time.
0 commit comments