7
7
*
8
8
* Contributors:
9
9
* Angelo Zerr <[email protected] > - initial API and implementation
10
+ * Lorenzo Dalla Vecchia <[email protected] > - adjusted usage of CompletableFuture
10
11
*/
11
12
package ts .client ;
12
13
@@ -77,8 +78,8 @@ public interface ITypeScriptServiceClient {
77
78
* @param insertString
78
79
* @throws TypeScriptException
79
80
*/
80
- // void changeFile(String fileName, int position, int endPosition, String
81
- // insertString) throws TypeScriptException;
81
+ // void changeFile(String fileName, int position, int
82
+ // endPosition, String insertString) throws TypeScriptException;
82
83
83
84
/**
84
85
* Change file content at the given lines/offsets.
@@ -102,10 +103,9 @@ void changeFile(String fileName, int line, int offset, int endLine, int endOffse
102
103
* @param fileName
103
104
* @param position
104
105
* @return completion for the given fileName at the given position.
105
- * @throws TypeScriptException
106
106
*/
107
107
// CompletableFuture<List<CompletionEntry>> completions(String fileName, int
108
- // position) throws TypeScriptException ;
108
+ // position);
109
109
110
110
/**
111
111
* Completion for the given fileName at the given line/offset.
@@ -114,16 +114,14 @@ void changeFile(String fileName, int line, int offset, int endLine, int endOffse
114
114
* @param line
115
115
* @param offset
116
116
* @return completion for the given fileName at the given line/offset
117
- * @throws TypeScriptException
118
117
*/
119
- CompletableFuture <List <CompletionEntry >> completions (String fileName , int line , int offset )
120
- throws TypeScriptException ;
118
+ CompletableFuture <List <CompletionEntry >> completions (String fileName , int line , int offset );
121
119
122
120
CompletableFuture <List <CompletionEntry >> completions (String name , int line , int offset ,
123
- ICompletionEntryFactory instanceCreator ) throws TypeScriptException ;
121
+ ICompletionEntryFactory instanceCreator );
124
122
125
123
CompletableFuture <List <CompletionEntryDetails >> completionEntryDetails (String fileName , int line , int offset ,
126
- String [] entryNames , CompletionEntry completionEntry ) throws TypeScriptException ;
124
+ String [] entryNames , CompletionEntry completionEntry );
127
125
128
126
/**
129
127
* Definition for the given fileName at the given line/offset.
@@ -132,9 +130,8 @@ CompletableFuture<List<CompletionEntryDetails>> completionEntryDetails(String fi
132
130
* @param line
133
131
* @param offset
134
132
* @return
135
- * @throws TypeScriptException
136
133
*/
137
- CompletableFuture <List <FileSpan >> definition (String fileName , int line , int offset ) throws TypeScriptException ;
134
+ CompletableFuture <List <FileSpan >> definition (String fileName , int line , int offset );
138
135
139
136
/**
140
137
* Signature help for the given fileName at the given line/offset.
@@ -143,10 +140,8 @@ CompletableFuture<List<CompletionEntryDetails>> completionEntryDetails(String fi
143
140
* @param line
144
141
* @param offset
145
142
* @return
146
- * @throws TypeScriptException
147
143
*/
148
- CompletableFuture <SignatureHelpItems > signatureHelp (String fileName , int line , int offset )
149
- throws TypeScriptException ;
144
+ CompletableFuture <SignatureHelpItems > signatureHelp (String fileName , int line , int offset );
150
145
151
146
/**
152
147
* Quick info for the given fileName at the given line/offset.
@@ -155,14 +150,12 @@ CompletableFuture<SignatureHelpItems> signatureHelp(String fileName, int line, i
155
150
* @param line
156
151
* @param offset
157
152
* @return
158
- * @throws TypeScriptException
159
153
*/
160
- CompletableFuture <QuickInfo > quickInfo (String fileName , int line , int offset ) throws TypeScriptException ;
154
+ CompletableFuture <QuickInfo > quickInfo (String fileName , int line , int offset );
161
155
162
- CompletableFuture <List <DiagnosticEvent >> geterr (String [] files , int delay ) throws TypeScriptException ;
156
+ CompletableFuture <List <DiagnosticEvent >> geterr (String [] files , int delay );
163
157
164
- CompletableFuture <List <DiagnosticEvent >> geterrForProject (String file , int delay , ProjectInfo projectInfo )
165
- throws TypeScriptException ;
158
+ CompletableFuture <List <DiagnosticEvent >> geterrForProject (String file , int delay , ProjectInfo projectInfo );
166
159
167
160
/**
168
161
* Format for the given fileName at the given line/offset.
@@ -173,10 +166,8 @@ CompletableFuture<List<DiagnosticEvent>> geterrForProject(String file, int delay
173
166
* @param endLine
174
167
* @param endOffset
175
168
* @return
176
- * @throws TypeScriptException
177
169
*/
178
- CompletableFuture <List <CodeEdit >> format (String fileName , int line , int offset , int endLine , int endOffset )
179
- throws TypeScriptException ;
170
+ CompletableFuture <List <CodeEdit >> format (String fileName , int line , int offset , int endLine , int endOffset );
180
171
181
172
/**
182
173
* Find references for the given fileName at the given line/offset.
@@ -185,10 +176,8 @@ CompletableFuture<List<CodeEdit>> format(String fileName, int line, int offset,
185
176
* @param line
186
177
* @param offset
187
178
* @return
188
- * @throws TypeScriptException
189
179
*/
190
- CompletableFuture <ReferencesResponseBody > references (String fileName , int line , int offset )
191
- throws TypeScriptException ;
180
+ CompletableFuture <ReferencesResponseBody > references (String fileName , int line , int offset );
192
181
193
182
/**
194
183
* Find occurrences for the given fileName at the given line/offset.
@@ -197,21 +186,17 @@ CompletableFuture<ReferencesResponseBody> references(String fileName, int line,
197
186
* @param line
198
187
* @param offset
199
188
* @return
200
- * @throws TypeScriptException
201
189
*/
202
- CompletableFuture <List <OccurrencesResponseItem >> occurrences (String fileName , int line , int offset )
203
- throws TypeScriptException ;
190
+ CompletableFuture <List <OccurrencesResponseItem >> occurrences (String fileName , int line , int offset );
204
191
205
192
CompletableFuture <RenameResponseBody > rename (String file , int line , int offset , Boolean findInComments ,
206
- Boolean findInStrings ) throws TypeScriptException ;
193
+ Boolean findInStrings );
207
194
208
- CompletableFuture <List <NavigationBarItem >> navbar (String fileName , IPositionProvider positionProvider )
209
- throws TypeScriptException ;
195
+ CompletableFuture <List <NavigationBarItem >> navbar (String fileName , IPositionProvider positionProvider );
210
196
211
197
void configure (ConfigureRequestArguments arguments ) throws TypeScriptException ;
212
198
213
- CompletableFuture <ProjectInfo > projectInfo (String file , String projectFileName , boolean needFileNameList )
214
- throws TypeScriptException ;
199
+ CompletableFuture <ProjectInfo > projectInfo (String file , String projectFileName , boolean needFileNameList );
215
200
216
201
// Since 2.0.3
217
202
@@ -220,42 +205,35 @@ CompletableFuture<ProjectInfo> projectInfo(String file, String projectFileName,
220
205
*
221
206
* @param includeLinePosition
222
207
* @return
223
- * @throws TypeScriptException
224
208
*/
225
- CompletableFuture <DiagnosticEventBody > semanticDiagnosticsSync (String file , Boolean includeLinePosition )
226
- throws TypeScriptException ;
209
+ CompletableFuture <DiagnosticEventBody > semanticDiagnosticsSync (String file , Boolean includeLinePosition );
227
210
228
211
/**
229
212
* Execute syntactic diagnostics for the given file.
230
213
*
231
214
* @param includeLinePosition
232
215
* @return
233
- * @throws TypeScriptException
234
216
*/
235
- CompletableFuture <DiagnosticEventBody > syntacticDiagnosticsSync (String file , Boolean includeLinePosition )
236
- throws TypeScriptException ;
217
+ CompletableFuture <DiagnosticEventBody > syntacticDiagnosticsSync (String file , Boolean includeLinePosition );
237
218
238
219
// Since 2.0.5
239
220
240
- CompletableFuture <Boolean > compileOnSaveEmitFile (String fileName , Boolean forced ) throws TypeScriptException ;
221
+ CompletableFuture <Boolean > compileOnSaveEmitFile (String fileName , Boolean forced );
241
222
242
- CompletableFuture <List <CompileOnSaveAffectedFileListSingleProject >> compileOnSaveAffectedFileList (String fileName )
243
- throws TypeScriptException ;
223
+ CompletableFuture <List <CompileOnSaveAffectedFileListSingleProject >> compileOnSaveAffectedFileList (String fileName );
244
224
245
225
// Since 2.0.6
246
226
247
- CompletableFuture <NavigationBarItem > navtree (String fileName , IPositionProvider positionProvider )
248
- throws TypeScriptException ;
227
+ CompletableFuture <NavigationBarItem > navtree (String fileName , IPositionProvider positionProvider );
249
228
250
- CompletableFuture <TextInsertion > docCommentTemplate (String fileName , int line , int offset )
251
- throws TypeScriptException ;
229
+ CompletableFuture <TextInsertion > docCommentTemplate (String fileName , int line , int offset );
252
230
253
231
// Since 2.1.0
254
232
255
233
CompletableFuture <List <CodeAction >> getCodeFixes (String fileName , IPositionProvider positionProvider , int startLine ,
256
- int startOffset , int endLine , int endOffset , List <Integer > errorCodes ) throws TypeScriptException ;
234
+ int startOffset , int endLine , int endOffset , List <Integer > errorCodes );
257
235
258
- CompletableFuture <List <String >> getSupportedCodeFixes () throws TypeScriptException ;
236
+ CompletableFuture <List <String >> getSupportedCodeFixes ();
259
237
260
238
//
261
239
/**
@@ -265,9 +243,8 @@ CompletableFuture<List<CodeAction>> getCodeFixes(String fileName, IPositionProvi
265
243
* @param line
266
244
* @param offset
267
245
* @return
268
- * @throws TypeScriptException
269
246
*/
270
- CompletableFuture <List <FileSpan >> implementation (String fileName , int line , int offset ) throws TypeScriptException ;
247
+ CompletableFuture <List <FileSpan >> implementation (String fileName , int line , int offset );
271
248
272
249
void addClientListener (ITypeScriptClientListener listener );
273
250
0 commit comments