File tree 2 files changed +22
-1
lines changed
app/src/cc/arduino/autocomplete
2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ class ArduinoCompletion {
10
10
ArduinoCompletionDetail completion ;
11
11
String type ;
12
12
String location ;
13
+ List <ArduinoParameter > parameters ;
13
14
14
15
public ArduinoCompletionDetail getCompletion () {
15
16
return completion ;
@@ -22,6 +23,23 @@ public String getType() {
22
23
public String getLocation () {
23
24
return location ;
24
25
}
26
+
27
+ public List <ArduinoParameter > getParameters () {
28
+ return parameters ;
29
+ }
30
+ }
31
+
32
+ class ArduinoParameter {
33
+ String name ;
34
+ String type ;
35
+
36
+ public String getName () {
37
+ return name ;
38
+ }
39
+
40
+ public String getType () {
41
+ return type ;
42
+ }
25
43
}
26
44
27
45
class ArduinoCompletionDetail {
Original file line number Diff line number Diff line change @@ -70,9 +70,12 @@ protected List<Completion> getCompletionsImpl(JTextComponent textarea) {
70
70
71
71
if (cc .type .equals ("Function" )) {
72
72
List <Parameter > params = new ArrayList <>();
73
+ int i =0 ;
73
74
for (CompletionChunk chunk : cc .completion .chunks ) {
74
75
if (chunk .placeholder != null ) {
75
- params .add (new Parameter ("type" , chunk .placeholder ));
76
+ ArduinoParameter p = cc .parameters .get (i );
77
+ params .add (new Parameter (p .type , p .name ));
78
+ i ++;
76
79
}
77
80
}
78
81
You can’t perform that action at this time.
0 commit comments