File tree 3 files changed +47
-1
lines changed
core/ts.core/src/ts/client/completions
3 files changed +47
-1
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,13 @@ public class CompletionEntry implements IKindProvider {
58
58
*/
59
59
private TextSpan replacementSpan ;
60
60
61
+ /**
62
+ * Indicating if commiting this completion entry will require additional
63
+ * code action to be made to avoid errors. The code action is normally
64
+ * adding an additional import statement.
65
+ */
66
+ private Boolean hasAction ;
67
+
61
68
private Boolean isFunction ;
62
69
63
70
private int relevance ;
@@ -67,7 +74,7 @@ public class CompletionEntry implements IKindProvider {
67
74
private final int offset ;
68
75
69
76
private final transient ICompletionEntryMatcher matcher ;
70
-
77
+
71
78
private final transient ITypeScriptServiceClient client ;
72
79
73
80
private List <CompletionEntryDetails > entryDetails ;
@@ -167,4 +174,7 @@ public List<CompletionEntryDetails> getEntryDetails() throws TypeScriptException
167
174
return this .entryDetails ;
168
175
}
169
176
177
+ public boolean hasActions () {
178
+ return hasAction != null && hasAction ;
179
+ }
170
180
}
Original file line number Diff line number Diff line change 12
12
13
13
import java .util .List ;
14
14
15
+ import ts .client .codefixes .CodeAction ;
16
+
15
17
/**
16
18
* Additional completion entry details, available on demand
17
19
*/
@@ -39,6 +41,16 @@ public class CompletionEntryDetails {
39
41
*/
40
42
List <SymbolDisplayPart > documentation ;
41
43
44
+ /**
45
+ * JSDoc tags for the symbol.
46
+ */
47
+ List <JSDocTagInfo > tags ;
48
+
49
+ /**
50
+ * The associated code actions for this entry
51
+ */
52
+ List <CodeAction > codeActions ;
53
+
42
54
public String getName () {
43
55
return name ;
44
56
}
@@ -58,4 +70,12 @@ public List<SymbolDisplayPart> getDisplayParts() {
58
70
public List <SymbolDisplayPart > getDocumentation () {
59
71
return documentation ;
60
72
}
73
+
74
+ public List <JSDocTagInfo > getTags () {
75
+ return tags ;
76
+ }
77
+
78
+ public List <CodeAction > getCodeActions () {
79
+ return codeActions ;
80
+ }
61
81
}
Original file line number Diff line number Diff line change
1
+ package ts .client .completions ;
2
+
3
+ public class JSDocTagInfo {
4
+
5
+ private String name ;
6
+
7
+ private String text ;
8
+
9
+ public String getName () {
10
+ return name ;
11
+ }
12
+
13
+ public String getText () {
14
+ return text ;
15
+ }
16
+ }
You can’t perform that action at this time.
0 commit comments