File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed
app/src/cc/arduino/autocomplete Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ class ArduinoCompletion {
1010 ArduinoCompletionDetail completion ;
1111 String type ;
1212 String location ;
13+ List <ArduinoParameter > parameters ;
1314
1415 public ArduinoCompletionDetail getCompletion () {
1516 return completion ;
@@ -22,6 +23,23 @@ public String getType() {
2223 public String getLocation () {
2324 return location ;
2425 }
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+ }
2543}
2644
2745class ArduinoCompletionDetail {
Original file line number Diff line number Diff line change @@ -70,9 +70,12 @@ protected List<Completion> getCompletionsImpl(JTextComponent textarea) {
7070
7171 if (cc .type .equals ("Function" )) {
7272 List <Parameter > params = new ArrayList <>();
73+ int i =0 ;
7374 for (CompletionChunk chunk : cc .completion .chunks ) {
7475 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 ++;
7679 }
7780 }
7881
You can’t perform that action at this time.
0 commit comments