OLD | NEW |
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 // | 4 // |
5 // This file has been automatically generated. Please do not edit it manually. | 5 // This file has been automatically generated. Please do not edit it manually. |
6 // To regenerate the file, use the script | 6 // To regenerate the file, use the script |
7 // "pkg/analysis_server/tool/spec/generate_files". | 7 // "pkg/analysis_server/tool/spec/generate_files". |
8 | 8 |
9 /** | 9 /** |
10 * Matchers for data types defined in the analysis server API | 10 * Matchers for data types defined in the analysis server API |
11 */ | 11 */ |
12 import 'package:test/test.dart'; | 12 import 'package:test/test.dart'; |
13 | 13 |
14 import 'integration_tests.dart'; | 14 import 'integration_tests.dart'; |
15 | 15 |
16 /** | 16 /** |
17 * plugin.versionCheck params | 17 * plugin.versionCheck params |
18 * | 18 * |
19 * { | 19 * { |
20 * "byteStorePath": String | 20 * "byteStorePath": String |
21 * "version": String | 21 * "version": String |
22 * } | 22 * } |
23 */ | 23 */ |
24 final Matcher isPluginVersionCheckParams = new LazyMatcher(() => new MatchesJson
Object( | 24 final Matcher isPluginVersionCheckParams = new LazyMatcher(() => |
25 "plugin.versionCheck params", { | 25 new MatchesJsonObject("plugin.versionCheck params", |
26 "byteStorePath": isString, | 26 {"byteStorePath": isString, "version": isString})); |
27 "version": isString | |
28 })); | |
29 | 27 |
30 /** | 28 /** |
31 * plugin.versionCheck result | 29 * plugin.versionCheck result |
32 * | 30 * |
33 * { | 31 * { |
34 * "isCompatible": bool | 32 * "isCompatible": bool |
35 * "name": String | 33 * "name": String |
36 * "version": String | 34 * "version": String |
37 * "contactInfo": optional String | 35 * "contactInfo": optional String |
38 * "interestingFiles": List<String> | 36 * "interestingFiles": List<String> |
39 * } | 37 * } |
40 */ | 38 */ |
41 final Matcher isPluginVersionCheckResult = new LazyMatcher(() => new MatchesJson
Object( | 39 final Matcher isPluginVersionCheckResult = |
42 "plugin.versionCheck result", { | 40 new LazyMatcher(() => new MatchesJsonObject("plugin.versionCheck result", { |
43 "isCompatible": isBool, | 41 "isCompatible": isBool, |
44 "name": isString, | 42 "name": isString, |
45 "version": isString, | 43 "version": isString, |
46 "interestingFiles": isListOf(isString) | 44 "interestingFiles": isListOf(isString) |
47 }, optionalFields: { | 45 }, optionalFields: { |
48 "contactInfo": isString | 46 "contactInfo": isString |
49 })); | 47 })); |
50 | 48 |
51 /** | 49 /** |
52 * plugin.shutdown params | 50 * plugin.shutdown params |
53 */ | 51 */ |
54 final Matcher isPluginShutdownParams = isNull; | 52 final Matcher isPluginShutdownParams = isNull; |
55 | 53 |
56 /** | 54 /** |
57 * plugin.shutdown result | 55 * plugin.shutdown result |
58 */ | 56 */ |
59 final Matcher isPluginShutdownResult = isNull; | 57 final Matcher isPluginShutdownResult = isNull; |
60 | 58 |
61 /** | 59 /** |
62 * plugin.error params | 60 * plugin.error params |
63 * | 61 * |
64 * { | 62 * { |
65 * "isFatal": bool | 63 * "isFatal": bool |
66 * "message": String | 64 * "message": String |
67 * "stackTrace": String | 65 * "stackTrace": String |
68 * } | 66 * } |
69 */ | 67 */ |
70 final Matcher isPluginErrorParams = new LazyMatcher(() => new MatchesJsonObject( | 68 final Matcher isPluginErrorParams = new LazyMatcher(() => new MatchesJsonObject( |
71 "plugin.error params", { | 69 "plugin.error params", |
72 "isFatal": isBool, | 70 {"isFatal": isBool, "message": isString, "stackTrace": isString})); |
73 "message": isString, | |
74 "stackTrace": isString | |
75 })); | |
76 | 71 |
77 /** | 72 /** |
78 * analysis.handleWatchEvents params | 73 * analysis.handleWatchEvents params |
79 * | 74 * |
80 * { | 75 * { |
81 * "events": List<WatchEvent> | 76 * "events": List<WatchEvent> |
82 * } | 77 * } |
83 */ | 78 */ |
84 final Matcher isAnalysisHandleWatchEventsParams = new LazyMatcher(() => new Matc
hesJsonObject( | 79 final Matcher isAnalysisHandleWatchEventsParams = new LazyMatcher(() => |
85 "analysis.handleWatchEvents params", { | 80 new MatchesJsonObject("analysis.handleWatchEvents params", |
86 "events": isListOf(isWatchEvent) | 81 {"events": isListOf(isWatchEvent)})); |
87 })); | |
88 | 82 |
89 /** | 83 /** |
90 * analysis.handleWatchEvents result | 84 * analysis.handleWatchEvents result |
91 */ | 85 */ |
92 final Matcher isAnalysisHandleWatchEventsResult = isNull; | 86 final Matcher isAnalysisHandleWatchEventsResult = isNull; |
93 | 87 |
94 /** | 88 /** |
95 * analysis.reanalyze params | 89 * analysis.reanalyze params |
96 * | 90 * |
97 * { | 91 * { |
98 * "roots": optional List<FilePath> | 92 * "roots": optional List<FilePath> |
99 * } | 93 * } |
100 */ | 94 */ |
101 final Matcher isAnalysisReanalyzeParams = new LazyMatcher(() => new MatchesJsonO
bject( | 95 final Matcher isAnalysisReanalyzeParams = new LazyMatcher(() => |
102 "analysis.reanalyze params", null, optionalFields: { | 96 new MatchesJsonObject("analysis.reanalyze params", null, |
103 "roots": isListOf(isFilePath) | 97 optionalFields: {"roots": isListOf(isFilePath)})); |
104 })); | |
105 | 98 |
106 /** | 99 /** |
107 * analysis.reanalyze result | 100 * analysis.reanalyze result |
108 */ | 101 */ |
109 final Matcher isAnalysisReanalyzeResult = isNull; | 102 final Matcher isAnalysisReanalyzeResult = isNull; |
110 | 103 |
111 /** | 104 /** |
112 * analysis.setContextBuilderOptions params | 105 * analysis.setContextBuilderOptions params |
113 * | 106 * |
114 * { | 107 * { |
115 * "options": ContextBuilderOptions | 108 * "options": ContextBuilderOptions |
116 * } | 109 * } |
117 */ | 110 */ |
118 final Matcher isAnalysisSetContextBuilderOptionsParams = new LazyMatcher(() => n
ew MatchesJsonObject( | 111 final Matcher isAnalysisSetContextBuilderOptionsParams = new LazyMatcher(() => |
119 "analysis.setContextBuilderOptions params", { | 112 new MatchesJsonObject("analysis.setContextBuilderOptions params", |
120 "options": isContextBuilderOptions | 113 {"options": isContextBuilderOptions})); |
121 })); | |
122 | 114 |
123 /** | 115 /** |
124 * analysis.setContextBuilderOptions result | 116 * analysis.setContextBuilderOptions result |
125 */ | 117 */ |
126 final Matcher isAnalysisSetContextBuilderOptionsResult = isNull; | 118 final Matcher isAnalysisSetContextBuilderOptionsResult = isNull; |
127 | 119 |
128 /** | 120 /** |
129 * analysis.setContextRoots params | 121 * analysis.setContextRoots params |
130 * | 122 * |
131 * { | 123 * { |
132 * "roots": List<ContextRoot> | 124 * "roots": List<ContextRoot> |
133 * } | 125 * } |
134 */ | 126 */ |
135 final Matcher isAnalysisSetContextRootsParams = new LazyMatcher(() => new Matche
sJsonObject( | 127 final Matcher isAnalysisSetContextRootsParams = new LazyMatcher(() => |
136 "analysis.setContextRoots params", { | 128 new MatchesJsonObject( |
137 "roots": isListOf(isContextRoot) | 129 "analysis.setContextRoots params", {"roots": isListOf(isContextRoot)})); |
138 })); | |
139 | 130 |
140 /** | 131 /** |
141 * analysis.setContextRoots result | 132 * analysis.setContextRoots result |
142 */ | 133 */ |
143 final Matcher isAnalysisSetContextRootsResult = isNull; | 134 final Matcher isAnalysisSetContextRootsResult = isNull; |
144 | 135 |
145 /** | 136 /** |
146 * analysis.setPriorityFiles params | 137 * analysis.setPriorityFiles params |
147 * | 138 * |
148 * { | 139 * { |
149 * "files": List<FilePath> | 140 * "files": List<FilePath> |
150 * } | 141 * } |
151 */ | 142 */ |
152 final Matcher isAnalysisSetPriorityFilesParams = new LazyMatcher(() => new Match
esJsonObject( | 143 final Matcher isAnalysisSetPriorityFilesParams = new LazyMatcher(() => |
153 "analysis.setPriorityFiles params", { | 144 new MatchesJsonObject( |
154 "files": isListOf(isFilePath) | 145 "analysis.setPriorityFiles params", {"files": isListOf(isFilePath)})); |
155 })); | |
156 | 146 |
157 /** | 147 /** |
158 * analysis.setPriorityFiles result | 148 * analysis.setPriorityFiles result |
159 */ | 149 */ |
160 final Matcher isAnalysisSetPriorityFilesResult = isNull; | 150 final Matcher isAnalysisSetPriorityFilesResult = isNull; |
161 | 151 |
162 /** | 152 /** |
163 * analysis.setSubscriptions params | 153 * analysis.setSubscriptions params |
164 * | 154 * |
165 * { | 155 * { |
166 * "subscriptions": Map<AnalysisService, List<FilePath>> | 156 * "subscriptions": Map<AnalysisService, List<FilePath>> |
167 * } | 157 * } |
168 */ | 158 */ |
169 final Matcher isAnalysisSetSubscriptionsParams = new LazyMatcher(() => new Match
esJsonObject( | 159 final Matcher isAnalysisSetSubscriptionsParams = new LazyMatcher(() => |
170 "analysis.setSubscriptions params", { | 160 new MatchesJsonObject("analysis.setSubscriptions params", |
171 "subscriptions": isMapOf(isAnalysisService, isListOf(isFilePath)) | 161 {"subscriptions": isMapOf(isAnalysisService, isListOf(isFilePath))})); |
172 })); | |
173 | 162 |
174 /** | 163 /** |
175 * analysis.setSubscriptions result | 164 * analysis.setSubscriptions result |
176 */ | 165 */ |
177 final Matcher isAnalysisSetSubscriptionsResult = isNull; | 166 final Matcher isAnalysisSetSubscriptionsResult = isNull; |
178 | 167 |
179 /** | 168 /** |
180 * analysis.updateContent params | 169 * analysis.updateContent params |
181 * | 170 * |
182 * { | 171 * { |
183 * "files": Map<FilePath, AddContentOverlay | ChangeContentOverlay | RemoveCon
tentOverlay> | 172 * "files": Map<FilePath, AddContentOverlay | ChangeContentOverlay | RemoveCon
tentOverlay> |
184 * } | 173 * } |
185 */ | 174 */ |
186 final Matcher isAnalysisUpdateContentParams = new LazyMatcher(() => new MatchesJ
sonObject( | 175 final Matcher isAnalysisUpdateContentParams = new LazyMatcher( |
187 "analysis.updateContent params", { | 176 () => new MatchesJsonObject("analysis.updateContent params", { |
188 "files": isMapOf(isFilePath, isOneOf([isAddContentOverlay, isChangeContentOv
erlay, isRemoveContentOverlay])) | 177 "files": isMapOf( |
189 })); | 178 isFilePath, |
| 179 isOneOf([ |
| 180 isAddContentOverlay, |
| 181 isChangeContentOverlay, |
| 182 isRemoveContentOverlay |
| 183 ])) |
| 184 })); |
190 | 185 |
191 /** | 186 /** |
192 * analysis.updateContent result | 187 * analysis.updateContent result |
193 */ | 188 */ |
194 final Matcher isAnalysisUpdateContentResult = isNull; | 189 final Matcher isAnalysisUpdateContentResult = isNull; |
195 | 190 |
196 /** | 191 /** |
197 * analysis.errors params | 192 * analysis.errors params |
198 * | 193 * |
199 * { | 194 * { |
200 * "file": FilePath | 195 * "file": FilePath |
201 * "errors": List<AnalysisError> | 196 * "errors": List<AnalysisError> |
202 * } | 197 * } |
203 */ | 198 */ |
204 final Matcher isAnalysisErrorsParams = new LazyMatcher(() => new MatchesJsonObje
ct( | 199 final Matcher isAnalysisErrorsParams = new LazyMatcher(() => |
205 "analysis.errors params", { | 200 new MatchesJsonObject("analysis.errors params", |
206 "file": isFilePath, | 201 {"file": isFilePath, "errors": isListOf(isAnalysisError)})); |
207 "errors": isListOf(isAnalysisError) | |
208 })); | |
209 | 202 |
210 /** | 203 /** |
211 * analysis.folding params | 204 * analysis.folding params |
212 * | 205 * |
213 * { | 206 * { |
214 * "file": FilePath | 207 * "file": FilePath |
215 * "regions": List<FoldingRegion> | 208 * "regions": List<FoldingRegion> |
216 * } | 209 * } |
217 */ | 210 */ |
218 final Matcher isAnalysisFoldingParams = new LazyMatcher(() => new MatchesJsonObj
ect( | 211 final Matcher isAnalysisFoldingParams = new LazyMatcher(() => |
219 "analysis.folding params", { | 212 new MatchesJsonObject("analysis.folding params", |
220 "file": isFilePath, | 213 {"file": isFilePath, "regions": isListOf(isFoldingRegion)})); |
221 "regions": isListOf(isFoldingRegion) | |
222 })); | |
223 | 214 |
224 /** | 215 /** |
225 * analysis.highlights params | 216 * analysis.highlights params |
226 * | 217 * |
227 * { | 218 * { |
228 * "file": FilePath | 219 * "file": FilePath |
229 * "regions": List<HighlightRegion> | 220 * "regions": List<HighlightRegion> |
230 * } | 221 * } |
231 */ | 222 */ |
232 final Matcher isAnalysisHighlightsParams = new LazyMatcher(() => new MatchesJson
Object( | 223 final Matcher isAnalysisHighlightsParams = new LazyMatcher(() => |
233 "analysis.highlights params", { | 224 new MatchesJsonObject("analysis.highlights params", |
234 "file": isFilePath, | 225 {"file": isFilePath, "regions": isListOf(isHighlightRegion)})); |
235 "regions": isListOf(isHighlightRegion) | |
236 })); | |
237 | 226 |
238 /** | 227 /** |
239 * analysis.navigation params | 228 * analysis.navigation params |
240 * | 229 * |
241 * { | 230 * { |
242 * "file": FilePath | 231 * "file": FilePath |
243 * "regions": List<NavigationRegion> | 232 * "regions": List<NavigationRegion> |
244 * "targets": List<NavigationTarget> | 233 * "targets": List<NavigationTarget> |
245 * "files": List<FilePath> | 234 * "files": List<FilePath> |
246 * } | 235 * } |
247 */ | 236 */ |
248 final Matcher isAnalysisNavigationParams = new LazyMatcher(() => new MatchesJson
Object( | 237 final Matcher isAnalysisNavigationParams = |
249 "analysis.navigation params", { | 238 new LazyMatcher(() => new MatchesJsonObject("analysis.navigation params", { |
250 "file": isFilePath, | 239 "file": isFilePath, |
251 "regions": isListOf(isNavigationRegion), | 240 "regions": isListOf(isNavigationRegion), |
252 "targets": isListOf(isNavigationTarget), | 241 "targets": isListOf(isNavigationTarget), |
253 "files": isListOf(isFilePath) | 242 "files": isListOf(isFilePath) |
254 })); | 243 })); |
255 | 244 |
256 /** | 245 /** |
257 * analysis.occurrences params | 246 * analysis.occurrences params |
258 * | 247 * |
259 * { | 248 * { |
260 * "file": FilePath | 249 * "file": FilePath |
261 * "occurrences": List<Occurrences> | 250 * "occurrences": List<Occurrences> |
262 * } | 251 * } |
263 */ | 252 */ |
264 final Matcher isAnalysisOccurrencesParams = new LazyMatcher(() => new MatchesJso
nObject( | 253 final Matcher isAnalysisOccurrencesParams = new LazyMatcher(() => |
265 "analysis.occurrences params", { | 254 new MatchesJsonObject("analysis.occurrences params", |
266 "file": isFilePath, | 255 {"file": isFilePath, "occurrences": isListOf(isOccurrences)})); |
267 "occurrences": isListOf(isOccurrences) | |
268 })); | |
269 | 256 |
270 /** | 257 /** |
271 * analysis.outline params | 258 * analysis.outline params |
272 * | 259 * |
273 * { | 260 * { |
274 * "file": FilePath | 261 * "file": FilePath |
275 * "outline": List<Outline> | 262 * "outline": List<Outline> |
276 * } | 263 * } |
277 */ | 264 */ |
278 final Matcher isAnalysisOutlineParams = new LazyMatcher(() => new MatchesJsonObj
ect( | 265 final Matcher isAnalysisOutlineParams = new LazyMatcher(() => |
279 "analysis.outline params", { | 266 new MatchesJsonObject("analysis.outline params", |
280 "file": isFilePath, | 267 {"file": isFilePath, "outline": isListOf(isOutline)})); |
281 "outline": isListOf(isOutline) | |
282 })); | |
283 | 268 |
284 /** | 269 /** |
285 * completion.getSuggestions params | 270 * completion.getSuggestions params |
286 * | 271 * |
287 * { | 272 * { |
288 * "file": FilePath | 273 * "file": FilePath |
289 * "offset": int | 274 * "offset": int |
290 * } | 275 * } |
291 */ | 276 */ |
292 final Matcher isCompletionGetSuggestionsParams = new LazyMatcher(() => new Match
esJsonObject( | 277 final Matcher isCompletionGetSuggestionsParams = new LazyMatcher(() => |
293 "completion.getSuggestions params", { | 278 new MatchesJsonObject("completion.getSuggestions params", |
294 "file": isFilePath, | 279 {"file": isFilePath, "offset": isInt})); |
295 "offset": isInt | |
296 })); | |
297 | 280 |
298 /** | 281 /** |
299 * completion.getSuggestions result | 282 * completion.getSuggestions result |
300 * | 283 * |
301 * { | 284 * { |
302 * "replacementOffset": int | 285 * "replacementOffset": int |
303 * "replacementLength": int | 286 * "replacementLength": int |
304 * "results": List<CompletionSuggestion> | 287 * "results": List<CompletionSuggestion> |
305 * } | 288 * } |
306 */ | 289 */ |
307 final Matcher isCompletionGetSuggestionsResult = new LazyMatcher(() => new Match
esJsonObject( | 290 final Matcher isCompletionGetSuggestionsResult = new LazyMatcher( |
308 "completion.getSuggestions result", { | 291 () => new MatchesJsonObject("completion.getSuggestions result", { |
309 "replacementOffset": isInt, | 292 "replacementOffset": isInt, |
310 "replacementLength": isInt, | 293 "replacementLength": isInt, |
311 "results": isListOf(isCompletionSuggestion) | 294 "results": isListOf(isCompletionSuggestion) |
312 })); | 295 })); |
313 | 296 |
314 /** | 297 /** |
315 * edit.getAssists params | 298 * edit.getAssists params |
316 * | 299 * |
317 * { | 300 * { |
318 * "file": FilePath | 301 * "file": FilePath |
319 * "offset": int | 302 * "offset": int |
320 * "length": int | 303 * "length": int |
321 * } | 304 * } |
322 */ | 305 */ |
323 final Matcher isEditGetAssistsParams = new LazyMatcher(() => new MatchesJsonObje
ct( | 306 final Matcher isEditGetAssistsParams = new LazyMatcher(() => |
324 "edit.getAssists params", { | 307 new MatchesJsonObject("edit.getAssists params", |
325 "file": isFilePath, | 308 {"file": isFilePath, "offset": isInt, "length": isInt})); |
326 "offset": isInt, | |
327 "length": isInt | |
328 })); | |
329 | 309 |
330 /** | 310 /** |
331 * edit.getAssists result | 311 * edit.getAssists result |
332 * | 312 * |
333 * { | 313 * { |
334 * "assists": List<PrioritizedSourceChange> | 314 * "assists": List<PrioritizedSourceChange> |
335 * } | 315 * } |
336 */ | 316 */ |
337 final Matcher isEditGetAssistsResult = new LazyMatcher(() => new MatchesJsonObje
ct( | 317 final Matcher isEditGetAssistsResult = new LazyMatcher(() => |
338 "edit.getAssists result", { | 318 new MatchesJsonObject("edit.getAssists result", |
339 "assists": isListOf(isPrioritizedSourceChange) | 319 {"assists": isListOf(isPrioritizedSourceChange)})); |
340 })); | |
341 | 320 |
342 /** | 321 /** |
343 * edit.getAvailableRefactorings params | 322 * edit.getAvailableRefactorings params |
344 * | 323 * |
345 * { | 324 * { |
346 * "file": FilePath | 325 * "file": FilePath |
347 * "offset": int | 326 * "offset": int |
348 * "length": int | 327 * "length": int |
349 * } | 328 * } |
350 */ | 329 */ |
351 final Matcher isEditGetAvailableRefactoringsParams = new LazyMatcher(() => new M
atchesJsonObject( | 330 final Matcher isEditGetAvailableRefactoringsParams = new LazyMatcher(() => |
352 "edit.getAvailableRefactorings params", { | 331 new MatchesJsonObject("edit.getAvailableRefactorings params", |
353 "file": isFilePath, | 332 {"file": isFilePath, "offset": isInt, "length": isInt})); |
354 "offset": isInt, | |
355 "length": isInt | |
356 })); | |
357 | 333 |
358 /** | 334 /** |
359 * edit.getAvailableRefactorings result | 335 * edit.getAvailableRefactorings result |
360 * | 336 * |
361 * { | 337 * { |
362 * "kinds": List<RefactoringKind> | 338 * "kinds": List<RefactoringKind> |
363 * } | 339 * } |
364 */ | 340 */ |
365 final Matcher isEditGetAvailableRefactoringsResult = new LazyMatcher(() => new M
atchesJsonObject( | 341 final Matcher isEditGetAvailableRefactoringsResult = new LazyMatcher(() => |
366 "edit.getAvailableRefactorings result", { | 342 new MatchesJsonObject("edit.getAvailableRefactorings result", |
367 "kinds": isListOf(isRefactoringKind) | 343 {"kinds": isListOf(isRefactoringKind)})); |
368 })); | |
369 | 344 |
370 /** | 345 /** |
371 * edit.getFixes params | 346 * edit.getFixes params |
372 * | 347 * |
373 * { | 348 * { |
374 * "file": FilePath | 349 * "file": FilePath |
375 * "offset": int | 350 * "offset": int |
376 * } | 351 * } |
377 */ | 352 */ |
378 final Matcher isEditGetFixesParams = new LazyMatcher(() => new MatchesJsonObject
( | 353 final Matcher isEditGetFixesParams = new LazyMatcher(() => |
379 "edit.getFixes params", { | 354 new MatchesJsonObject( |
380 "file": isFilePath, | 355 "edit.getFixes params", {"file": isFilePath, "offset": isInt})); |
381 "offset": isInt | |
382 })); | |
383 | 356 |
384 /** | 357 /** |
385 * edit.getFixes result | 358 * edit.getFixes result |
386 * | 359 * |
387 * { | 360 * { |
388 * "fixes": List<AnalysisErrorFixes> | 361 * "fixes": List<AnalysisErrorFixes> |
389 * } | 362 * } |
390 */ | 363 */ |
391 final Matcher isEditGetFixesResult = new LazyMatcher(() => new MatchesJsonObject
( | 364 final Matcher isEditGetFixesResult = new LazyMatcher(() => |
392 "edit.getFixes result", { | 365 new MatchesJsonObject( |
393 "fixes": isListOf(isAnalysisErrorFixes) | 366 "edit.getFixes result", {"fixes": isListOf(isAnalysisErrorFixes)})); |
394 })); | |
395 | 367 |
396 /** | 368 /** |
397 * edit.getRefactoring params | 369 * edit.getRefactoring params |
398 * | 370 * |
399 * { | 371 * { |
400 * "kind": RefactoringKind | 372 * "kind": RefactoringKind |
401 * "file": FilePath | 373 * "file": FilePath |
402 * "offset": int | 374 * "offset": int |
403 * "length": int | 375 * "length": int |
404 * "validateOnly": bool | 376 * "validateOnly": bool |
405 * "options": optional RefactoringOptions | 377 * "options": optional RefactoringOptions |
406 * } | 378 * } |
407 */ | 379 */ |
408 final Matcher isEditGetRefactoringParams = new LazyMatcher(() => new MatchesJson
Object( | 380 final Matcher isEditGetRefactoringParams = |
409 "edit.getRefactoring params", { | 381 new LazyMatcher(() => new MatchesJsonObject("edit.getRefactoring params", { |
410 "kind": isRefactoringKind, | 382 "kind": isRefactoringKind, |
411 "file": isFilePath, | 383 "file": isFilePath, |
412 "offset": isInt, | 384 "offset": isInt, |
413 "length": isInt, | 385 "length": isInt, |
414 "validateOnly": isBool | 386 "validateOnly": isBool |
415 }, optionalFields: { | 387 }, optionalFields: { |
416 "options": isRefactoringOptions | 388 "options": isRefactoringOptions |
417 })); | 389 })); |
418 | 390 |
419 /** | 391 /** |
420 * edit.getRefactoring result | 392 * edit.getRefactoring result |
421 * | 393 * |
422 * { | 394 * { |
423 * "initialProblems": List<RefactoringProblem> | 395 * "initialProblems": List<RefactoringProblem> |
424 * "optionsProblems": List<RefactoringProblem> | 396 * "optionsProblems": List<RefactoringProblem> |
425 * "finalProblems": List<RefactoringProblem> | 397 * "finalProblems": List<RefactoringProblem> |
426 * "feedback": optional RefactoringFeedback | 398 * "feedback": optional RefactoringFeedback |
427 * "change": optional SourceChange | 399 * "change": optional SourceChange |
428 * "potentialEdits": optional List<String> | 400 * "potentialEdits": optional List<String> |
429 * } | 401 * } |
430 */ | 402 */ |
431 final Matcher isEditGetRefactoringResult = new LazyMatcher(() => new MatchesJson
Object( | 403 final Matcher isEditGetRefactoringResult = |
432 "edit.getRefactoring result", { | 404 new LazyMatcher(() => new MatchesJsonObject("edit.getRefactoring result", { |
433 "initialProblems": isListOf(isRefactoringProblem), | 405 "initialProblems": isListOf(isRefactoringProblem), |
434 "optionsProblems": isListOf(isRefactoringProblem), | 406 "optionsProblems": isListOf(isRefactoringProblem), |
435 "finalProblems": isListOf(isRefactoringProblem) | 407 "finalProblems": isListOf(isRefactoringProblem) |
436 }, optionalFields: { | 408 }, optionalFields: { |
437 "feedback": isRefactoringFeedback, | 409 "feedback": isRefactoringFeedback, |
438 "change": isSourceChange, | 410 "change": isSourceChange, |
439 "potentialEdits": isListOf(isString) | 411 "potentialEdits": isListOf(isString) |
440 })); | 412 })); |
441 | 413 |
442 /** | 414 /** |
443 * AddContentOverlay | 415 * AddContentOverlay |
444 * | 416 * |
445 * { | 417 * { |
446 * "type": "add" | 418 * "type": "add" |
447 * "content": String | 419 * "content": String |
448 * } | 420 * } |
449 */ | 421 */ |
450 final Matcher isAddContentOverlay = new LazyMatcher(() => new MatchesJsonObject( | 422 final Matcher isAddContentOverlay = new LazyMatcher(() => new MatchesJsonObject( |
451 "AddContentOverlay", { | 423 "AddContentOverlay", {"type": equals("add"), "content": isString})); |
452 "type": equals("add"), | |
453 "content": isString | |
454 })); | |
455 | 424 |
456 /** | 425 /** |
457 * AnalysisError | 426 * AnalysisError |
458 * | 427 * |
459 * { | 428 * { |
460 * "severity": AnalysisErrorSeverity | 429 * "severity": AnalysisErrorSeverity |
461 * "type": AnalysisErrorType | 430 * "type": AnalysisErrorType |
462 * "location": Location | 431 * "location": Location |
463 * "message": String | 432 * "message": String |
464 * "correction": optional String | 433 * "correction": optional String |
465 * "code": String | 434 * "code": String |
466 * "hasFix": optional bool | 435 * "hasFix": optional bool |
467 * } | 436 * } |
468 */ | 437 */ |
469 final Matcher isAnalysisError = new LazyMatcher(() => new MatchesJsonObject( | 438 final Matcher isAnalysisError = |
470 "AnalysisError", { | 439 new LazyMatcher(() => new MatchesJsonObject("AnalysisError", { |
471 "severity": isAnalysisErrorSeverity, | 440 "severity": isAnalysisErrorSeverity, |
472 "type": isAnalysisErrorType, | 441 "type": isAnalysisErrorType, |
473 "location": isLocation, | 442 "location": isLocation, |
474 "message": isString, | 443 "message": isString, |
475 "code": isString | 444 "code": isString |
476 }, optionalFields: { | 445 }, optionalFields: { |
477 "correction": isString, | 446 "correction": isString, |
478 "hasFix": isBool | 447 "hasFix": isBool |
479 })); | 448 })); |
480 | 449 |
481 /** | 450 /** |
482 * AnalysisErrorFixes | 451 * AnalysisErrorFixes |
483 * | 452 * |
484 * { | 453 * { |
485 * "error": AnalysisError | 454 * "error": AnalysisError |
486 * "fixes": List<PrioritizedSourceChange> | 455 * "fixes": List<PrioritizedSourceChange> |
487 * } | 456 * } |
488 */ | 457 */ |
489 final Matcher isAnalysisErrorFixes = new LazyMatcher(() => new MatchesJsonObject
( | 458 final Matcher isAnalysisErrorFixes = new LazyMatcher(() => |
490 "AnalysisErrorFixes", { | 459 new MatchesJsonObject("AnalysisErrorFixes", { |
491 "error": isAnalysisError, | 460 "error": isAnalysisError, |
492 "fixes": isListOf(isPrioritizedSourceChange) | 461 "fixes": isListOf(isPrioritizedSourceChange) |
493 })); | 462 })); |
494 | 463 |
495 /** | 464 /** |
496 * AnalysisErrorSeverity | 465 * AnalysisErrorSeverity |
497 * | 466 * |
498 * enum { | 467 * enum { |
499 * INFO | 468 * INFO |
500 * WARNING | 469 * WARNING |
501 * ERROR | 470 * ERROR |
502 * } | 471 * } |
503 */ | 472 */ |
504 final Matcher isAnalysisErrorSeverity = new MatchesEnum("AnalysisErrorSeverity",
[ | 473 final Matcher isAnalysisErrorSeverity = |
505 "INFO", | 474 new MatchesEnum("AnalysisErrorSeverity", ["INFO", "WARNING", "ERROR"]); |
506 "WARNING", | |
507 "ERROR" | |
508 ]); | |
509 | 475 |
510 /** | 476 /** |
511 * AnalysisErrorType | 477 * AnalysisErrorType |
512 * | 478 * |
513 * enum { | 479 * enum { |
514 * CHECKED_MODE_COMPILE_TIME_ERROR | 480 * CHECKED_MODE_COMPILE_TIME_ERROR |
515 * COMPILE_TIME_ERROR | 481 * COMPILE_TIME_ERROR |
516 * HINT | 482 * HINT |
517 * LINT | 483 * LINT |
518 * STATIC_TYPE_WARNING | 484 * STATIC_TYPE_WARNING |
(...skipping 17 matching lines...) Expand all Loading... |
536 * AnalysisService | 502 * AnalysisService |
537 * | 503 * |
538 * enum { | 504 * enum { |
539 * FOLDING | 505 * FOLDING |
540 * HIGHLIGHTS | 506 * HIGHLIGHTS |
541 * NAVIGATION | 507 * NAVIGATION |
542 * OCCURRENCES | 508 * OCCURRENCES |
543 * OUTLINE | 509 * OUTLINE |
544 * } | 510 * } |
545 */ | 511 */ |
546 final Matcher isAnalysisService = new MatchesEnum("AnalysisService", [ | 512 final Matcher isAnalysisService = new MatchesEnum("AnalysisService", |
547 "FOLDING", | 513 ["FOLDING", "HIGHLIGHTS", "NAVIGATION", "OCCURRENCES", "OUTLINE"]); |
548 "HIGHLIGHTS", | |
549 "NAVIGATION", | |
550 "OCCURRENCES", | |
551 "OUTLINE" | |
552 ]); | |
553 | 514 |
554 /** | 515 /** |
555 * ChangeContentOverlay | 516 * ChangeContentOverlay |
556 * | 517 * |
557 * { | 518 * { |
558 * "type": "change" | 519 * "type": "change" |
559 * "edits": List<SourceEdit> | 520 * "edits": List<SourceEdit> |
560 * } | 521 * } |
561 */ | 522 */ |
562 final Matcher isChangeContentOverlay = new LazyMatcher(() => new MatchesJsonObje
ct( | 523 final Matcher isChangeContentOverlay = new LazyMatcher(() => |
563 "ChangeContentOverlay", { | 524 new MatchesJsonObject("ChangeContentOverlay", |
564 "type": equals("change"), | 525 {"type": equals("change"), "edits": isListOf(isSourceEdit)})); |
565 "edits": isListOf(isSourceEdit) | |
566 })); | |
567 | 526 |
568 /** | 527 /** |
569 * CompletionSuggestion | 528 * CompletionSuggestion |
570 * | 529 * |
571 * { | 530 * { |
572 * "kind": CompletionSuggestionKind | 531 * "kind": CompletionSuggestionKind |
573 * "relevance": int | 532 * "relevance": int |
574 * "completion": String | 533 * "completion": String |
575 * "selectionOffset": int | 534 * "selectionOffset": int |
576 * "selectionLength": int | 535 * "selectionLength": int |
577 * "isDeprecated": bool | 536 * "isDeprecated": bool |
578 * "isPotential": bool | 537 * "isPotential": bool |
579 * "docSummary": optional String | 538 * "docSummary": optional String |
580 * "docComplete": optional String | 539 * "docComplete": optional String |
581 * "declaringType": optional String | 540 * "declaringType": optional String |
582 * "defaultArgumentListString": optional String | 541 * "defaultArgumentListString": optional String |
583 * "defaultArgumentListTextRanges": optional List<int> | 542 * "defaultArgumentListTextRanges": optional List<int> |
584 * "element": optional Element | 543 * "element": optional Element |
585 * "returnType": optional String | 544 * "returnType": optional String |
586 * "parameterNames": optional List<String> | 545 * "parameterNames": optional List<String> |
587 * "parameterTypes": optional List<String> | 546 * "parameterTypes": optional List<String> |
588 * "requiredParameterCount": optional int | 547 * "requiredParameterCount": optional int |
589 * "hasNamedParameters": optional bool | 548 * "hasNamedParameters": optional bool |
590 * "parameterName": optional String | 549 * "parameterName": optional String |
591 * "parameterType": optional String | 550 * "parameterType": optional String |
592 * "importUri": optional String | 551 * "importUri": optional String |
593 * } | 552 * } |
594 */ | 553 */ |
595 final Matcher isCompletionSuggestion = new LazyMatcher(() => new MatchesJsonObje
ct( | 554 final Matcher isCompletionSuggestion = |
596 "CompletionSuggestion", { | 555 new LazyMatcher(() => new MatchesJsonObject("CompletionSuggestion", { |
597 "kind": isCompletionSuggestionKind, | 556 "kind": isCompletionSuggestionKind, |
598 "relevance": isInt, | 557 "relevance": isInt, |
599 "completion": isString, | 558 "completion": isString, |
600 "selectionOffset": isInt, | 559 "selectionOffset": isInt, |
601 "selectionLength": isInt, | 560 "selectionLength": isInt, |
602 "isDeprecated": isBool, | 561 "isDeprecated": isBool, |
603 "isPotential": isBool | 562 "isPotential": isBool |
604 }, optionalFields: { | 563 }, optionalFields: { |
605 "docSummary": isString, | 564 "docSummary": isString, |
606 "docComplete": isString, | 565 "docComplete": isString, |
607 "declaringType": isString, | 566 "declaringType": isString, |
608 "defaultArgumentListString": isString, | 567 "defaultArgumentListString": isString, |
609 "defaultArgumentListTextRanges": isListOf(isInt), | 568 "defaultArgumentListTextRanges": isListOf(isInt), |
610 "element": isElement, | 569 "element": isElement, |
611 "returnType": isString, | 570 "returnType": isString, |
612 "parameterNames": isListOf(isString), | 571 "parameterNames": isListOf(isString), |
613 "parameterTypes": isListOf(isString), | 572 "parameterTypes": isListOf(isString), |
614 "requiredParameterCount": isInt, | 573 "requiredParameterCount": isInt, |
615 "hasNamedParameters": isBool, | 574 "hasNamedParameters": isBool, |
616 "parameterName": isString, | 575 "parameterName": isString, |
617 "parameterType": isString, | 576 "parameterType": isString, |
618 "importUri": isString | 577 "importUri": isString |
619 })); | 578 })); |
620 | 579 |
621 /** | 580 /** |
622 * CompletionSuggestionKind | 581 * CompletionSuggestionKind |
623 * | 582 * |
624 * enum { | 583 * enum { |
625 * ARGUMENT_LIST | 584 * ARGUMENT_LIST |
626 * IMPORT | 585 * IMPORT |
627 * IDENTIFIER | 586 * IDENTIFIER |
628 * INVOCATION | 587 * INVOCATION |
629 * KEYWORD | 588 * KEYWORD |
630 * NAMED_ARGUMENT | 589 * NAMED_ARGUMENT |
631 * OPTIONAL_ARGUMENT | 590 * OPTIONAL_ARGUMENT |
632 * PARAMETER | 591 * PARAMETER |
633 * } | 592 * } |
634 */ | 593 */ |
635 final Matcher isCompletionSuggestionKind = new MatchesEnum("CompletionSuggestion
Kind", [ | 594 final Matcher isCompletionSuggestionKind = |
| 595 new MatchesEnum("CompletionSuggestionKind", [ |
636 "ARGUMENT_LIST", | 596 "ARGUMENT_LIST", |
637 "IMPORT", | 597 "IMPORT", |
638 "IDENTIFIER", | 598 "IDENTIFIER", |
639 "INVOCATION", | 599 "INVOCATION", |
640 "KEYWORD", | 600 "KEYWORD", |
641 "NAMED_ARGUMENT", | 601 "NAMED_ARGUMENT", |
642 "OPTIONAL_ARGUMENT", | 602 "OPTIONAL_ARGUMENT", |
643 "PARAMETER" | 603 "PARAMETER" |
644 ]); | 604 ]); |
645 | 605 |
646 /** | 606 /** |
647 * ContextBuilderOptions | 607 * ContextBuilderOptions |
648 * | 608 * |
649 * { | 609 * { |
650 * "dartSdkSummaryPath": optional String | 610 * "dartSdkSummaryPath": optional String |
651 * "defaultAnalysisOptionsFilePath": optional List<String> | 611 * "defaultAnalysisOptionsFilePath": optional List<String> |
652 * "declaredVariables": optional Map<String, String> | 612 * "declaredVariables": optional Map<String, String> |
653 * "defaultPackageFilePath": optional List<String> | 613 * "defaultPackageFilePath": optional List<String> |
654 * "defaultPackagesDirectoryPath": optional List<String> | 614 * "defaultPackagesDirectoryPath": optional List<String> |
655 * } | 615 * } |
656 */ | 616 */ |
657 final Matcher isContextBuilderOptions = new LazyMatcher(() => new MatchesJsonObj
ect( | 617 final Matcher isContextBuilderOptions = new LazyMatcher( |
658 "ContextBuilderOptions", null, optionalFields: { | 618 () => new MatchesJsonObject("ContextBuilderOptions", null, optionalFields: { |
659 "dartSdkSummaryPath": isString, | 619 "dartSdkSummaryPath": isString, |
660 "defaultAnalysisOptionsFilePath": isListOf(isString), | 620 "defaultAnalysisOptionsFilePath": isListOf(isString), |
661 "declaredVariables": isMapOf(isString, isString), | 621 "declaredVariables": isMapOf(isString, isString), |
662 "defaultPackageFilePath": isListOf(isString), | 622 "defaultPackageFilePath": isListOf(isString), |
663 "defaultPackagesDirectoryPath": isListOf(isString) | 623 "defaultPackagesDirectoryPath": isListOf(isString) |
664 })); | 624 })); |
665 | 625 |
666 /** | 626 /** |
667 * ContextRoot | 627 * ContextRoot |
668 * | 628 * |
669 * { | 629 * { |
670 * "root": String | 630 * "root": String |
671 * "exclude": List<String> | 631 * "exclude": List<String> |
672 * } | 632 * } |
673 */ | 633 */ |
674 final Matcher isContextRoot = new LazyMatcher(() => new MatchesJsonObject( | 634 final Matcher isContextRoot = new LazyMatcher(() => new MatchesJsonObject( |
675 "ContextRoot", { | 635 "ContextRoot", {"root": isString, "exclude": isListOf(isString)})); |
676 "root": isString, | |
677 "exclude": isListOf(isString) | |
678 })); | |
679 | 636 |
680 /** | 637 /** |
681 * Element | 638 * Element |
682 * | 639 * |
683 * { | 640 * { |
684 * "kind": ElementKind | 641 * "kind": ElementKind |
685 * "name": String | 642 * "name": String |
686 * "location": optional Location | 643 * "location": optional Location |
687 * "flags": int | 644 * "flags": int |
688 * "parameters": optional String | 645 * "parameters": optional String |
689 * "returnType": optional String | 646 * "returnType": optional String |
690 * "typeParameters": optional String | 647 * "typeParameters": optional String |
691 * } | 648 * } |
692 */ | 649 */ |
693 final Matcher isElement = new LazyMatcher(() => new MatchesJsonObject( | 650 final Matcher isElement = |
694 "Element", { | 651 new LazyMatcher(() => new MatchesJsonObject("Element", { |
695 "kind": isElementKind, | 652 "kind": isElementKind, |
696 "name": isString, | 653 "name": isString, |
697 "flags": isInt | 654 "flags": isInt |
698 }, optionalFields: { | 655 }, optionalFields: { |
699 "location": isLocation, | 656 "location": isLocation, |
700 "parameters": isString, | 657 "parameters": isString, |
701 "returnType": isString, | 658 "returnType": isString, |
702 "typeParameters": isString | 659 "typeParameters": isString |
703 })); | 660 })); |
704 | 661 |
705 /** | 662 /** |
706 * ElementKind | 663 * ElementKind |
707 * | 664 * |
708 * enum { | 665 * enum { |
709 * CLASS | 666 * CLASS |
710 * CLASS_TYPE_ALIAS | 667 * CLASS_TYPE_ALIAS |
711 * COMPILATION_UNIT | 668 * COMPILATION_UNIT |
712 * CONSTRUCTOR | 669 * CONSTRUCTOR |
713 * ENUM | 670 * ENUM |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
782 /** | 739 /** |
783 * FoldingRegion | 740 * FoldingRegion |
784 * | 741 * |
785 * { | 742 * { |
786 * "kind": FoldingKind | 743 * "kind": FoldingKind |
787 * "offset": int | 744 * "offset": int |
788 * "length": int | 745 * "length": int |
789 * } | 746 * } |
790 */ | 747 */ |
791 final Matcher isFoldingRegion = new LazyMatcher(() => new MatchesJsonObject( | 748 final Matcher isFoldingRegion = new LazyMatcher(() => new MatchesJsonObject( |
792 "FoldingRegion", { | 749 "FoldingRegion", |
793 "kind": isFoldingKind, | 750 {"kind": isFoldingKind, "offset": isInt, "length": isInt})); |
794 "offset": isInt, | |
795 "length": isInt | |
796 })); | |
797 | 751 |
798 /** | 752 /** |
799 * HighlightRegion | 753 * HighlightRegion |
800 * | 754 * |
801 * { | 755 * { |
802 * "type": HighlightRegionType | 756 * "type": HighlightRegionType |
803 * "offset": int | 757 * "offset": int |
804 * "length": int | 758 * "length": int |
805 * } | 759 * } |
806 */ | 760 */ |
807 final Matcher isHighlightRegion = new LazyMatcher(() => new MatchesJsonObject( | 761 final Matcher isHighlightRegion = new LazyMatcher(() => new MatchesJsonObject( |
808 "HighlightRegion", { | 762 "HighlightRegion", |
809 "type": isHighlightRegionType, | 763 {"type": isHighlightRegionType, "offset": isInt, "length": isInt})); |
810 "offset": isInt, | |
811 "length": isInt | |
812 })); | |
813 | 764 |
814 /** | 765 /** |
815 * HighlightRegionType | 766 * HighlightRegionType |
816 * | 767 * |
817 * enum { | 768 * enum { |
818 * ANNOTATION | 769 * ANNOTATION |
819 * BUILT_IN | 770 * BUILT_IN |
820 * CLASS | 771 * CLASS |
821 * COMMENT_BLOCK | 772 * COMMENT_BLOCK |
822 * COMMENT_DOCUMENTATION | 773 * COMMENT_DOCUMENTATION |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
968 | 919 |
969 /** | 920 /** |
970 * LinkedEditGroup | 921 * LinkedEditGroup |
971 * | 922 * |
972 * { | 923 * { |
973 * "positions": List<Position> | 924 * "positions": List<Position> |
974 * "length": int | 925 * "length": int |
975 * "suggestions": List<LinkedEditSuggestion> | 926 * "suggestions": List<LinkedEditSuggestion> |
976 * } | 927 * } |
977 */ | 928 */ |
978 final Matcher isLinkedEditGroup = new LazyMatcher(() => new MatchesJsonObject( | 929 final Matcher isLinkedEditGroup = |
979 "LinkedEditGroup", { | 930 new LazyMatcher(() => new MatchesJsonObject("LinkedEditGroup", { |
980 "positions": isListOf(isPosition), | 931 "positions": isListOf(isPosition), |
981 "length": isInt, | 932 "length": isInt, |
982 "suggestions": isListOf(isLinkedEditSuggestion) | 933 "suggestions": isListOf(isLinkedEditSuggestion) |
983 })); | 934 })); |
984 | 935 |
985 /** | 936 /** |
986 * LinkedEditSuggestion | 937 * LinkedEditSuggestion |
987 * | 938 * |
988 * { | 939 * { |
989 * "value": String | 940 * "value": String |
990 * "kind": LinkedEditSuggestionKind | 941 * "kind": LinkedEditSuggestionKind |
991 * } | 942 * } |
992 */ | 943 */ |
993 final Matcher isLinkedEditSuggestion = new LazyMatcher(() => new MatchesJsonObje
ct( | 944 final Matcher isLinkedEditSuggestion = new LazyMatcher(() => |
994 "LinkedEditSuggestion", { | 945 new MatchesJsonObject("LinkedEditSuggestion", |
995 "value": isString, | 946 {"value": isString, "kind": isLinkedEditSuggestionKind})); |
996 "kind": isLinkedEditSuggestionKind | |
997 })); | |
998 | 947 |
999 /** | 948 /** |
1000 * LinkedEditSuggestionKind | 949 * LinkedEditSuggestionKind |
1001 * | 950 * |
1002 * enum { | 951 * enum { |
1003 * METHOD | 952 * METHOD |
1004 * PARAMETER | 953 * PARAMETER |
1005 * TYPE | 954 * TYPE |
1006 * VARIABLE | 955 * VARIABLE |
1007 * } | 956 * } |
1008 */ | 957 */ |
1009 final Matcher isLinkedEditSuggestionKind = new MatchesEnum("LinkedEditSuggestion
Kind", [ | 958 final Matcher isLinkedEditSuggestionKind = new MatchesEnum( |
1010 "METHOD", | 959 "LinkedEditSuggestionKind", ["METHOD", "PARAMETER", "TYPE", "VARIABLE"]); |
1011 "PARAMETER", | |
1012 "TYPE", | |
1013 "VARIABLE" | |
1014 ]); | |
1015 | 960 |
1016 /** | 961 /** |
1017 * Location | 962 * Location |
1018 * | 963 * |
1019 * { | 964 * { |
1020 * "file": FilePath | 965 * "file": FilePath |
1021 * "offset": int | 966 * "offset": int |
1022 * "length": int | 967 * "length": int |
1023 * "startLine": int | 968 * "startLine": int |
1024 * "startColumn": int | 969 * "startColumn": int |
1025 * } | 970 * } |
1026 */ | 971 */ |
1027 final Matcher isLocation = new LazyMatcher(() => new MatchesJsonObject( | 972 final Matcher isLocation = |
1028 "Location", { | 973 new LazyMatcher(() => new MatchesJsonObject("Location", { |
1029 "file": isFilePath, | 974 "file": isFilePath, |
1030 "offset": isInt, | 975 "offset": isInt, |
1031 "length": isInt, | 976 "length": isInt, |
1032 "startLine": isInt, | 977 "startLine": isInt, |
1033 "startColumn": isInt | 978 "startColumn": isInt |
1034 })); | 979 })); |
1035 | 980 |
1036 /** | 981 /** |
1037 * NavigationRegion | 982 * NavigationRegion |
1038 * | 983 * |
1039 * { | 984 * { |
1040 * "offset": int | 985 * "offset": int |
1041 * "length": int | 986 * "length": int |
1042 * "targets": List<int> | 987 * "targets": List<int> |
1043 * } | 988 * } |
1044 */ | 989 */ |
1045 final Matcher isNavigationRegion = new LazyMatcher(() => new MatchesJsonObject( | 990 final Matcher isNavigationRegion = new LazyMatcher(() => new MatchesJsonObject( |
1046 "NavigationRegion", { | 991 "NavigationRegion", |
1047 "offset": isInt, | 992 {"offset": isInt, "length": isInt, "targets": isListOf(isInt)})); |
1048 "length": isInt, | |
1049 "targets": isListOf(isInt) | |
1050 })); | |
1051 | 993 |
1052 /** | 994 /** |
1053 * NavigationTarget | 995 * NavigationTarget |
1054 * | 996 * |
1055 * { | 997 * { |
1056 * "kind": ElementKind | 998 * "kind": ElementKind |
1057 * "fileIndex": int | 999 * "fileIndex": int |
1058 * "offset": int | 1000 * "offset": int |
1059 * "length": int | 1001 * "length": int |
1060 * "startLine": int | 1002 * "startLine": int |
1061 * "startColumn": int | 1003 * "startColumn": int |
1062 * } | 1004 * } |
1063 */ | 1005 */ |
1064 final Matcher isNavigationTarget = new LazyMatcher(() => new MatchesJsonObject( | 1006 final Matcher isNavigationTarget = |
1065 "NavigationTarget", { | 1007 new LazyMatcher(() => new MatchesJsonObject("NavigationTarget", { |
1066 "kind": isElementKind, | 1008 "kind": isElementKind, |
1067 "fileIndex": isInt, | 1009 "fileIndex": isInt, |
1068 "offset": isInt, | 1010 "offset": isInt, |
1069 "length": isInt, | 1011 "length": isInt, |
1070 "startLine": isInt, | 1012 "startLine": isInt, |
1071 "startColumn": isInt | 1013 "startColumn": isInt |
1072 })); | 1014 })); |
1073 | 1015 |
1074 /** | 1016 /** |
1075 * Occurrences | 1017 * Occurrences |
1076 * | 1018 * |
1077 * { | 1019 * { |
1078 * "element": Element | 1020 * "element": Element |
1079 * "offsets": List<int> | 1021 * "offsets": List<int> |
1080 * "length": int | 1022 * "length": int |
1081 * } | 1023 * } |
1082 */ | 1024 */ |
1083 final Matcher isOccurrences = new LazyMatcher(() => new MatchesJsonObject( | 1025 final Matcher isOccurrences = new LazyMatcher(() => new MatchesJsonObject( |
1084 "Occurrences", { | 1026 "Occurrences", |
1085 "element": isElement, | 1027 {"element": isElement, "offsets": isListOf(isInt), "length": isInt})); |
1086 "offsets": isListOf(isInt), | |
1087 "length": isInt | |
1088 })); | |
1089 | 1028 |
1090 /** | 1029 /** |
1091 * Outline | 1030 * Outline |
1092 * | 1031 * |
1093 * { | 1032 * { |
1094 * "element": Element | 1033 * "element": Element |
1095 * "offset": int | 1034 * "offset": int |
1096 * "length": int | 1035 * "length": int |
1097 * "children": optional List<Outline> | 1036 * "children": optional List<Outline> |
1098 * } | 1037 * } |
1099 */ | 1038 */ |
1100 final Matcher isOutline = new LazyMatcher(() => new MatchesJsonObject( | 1039 final Matcher isOutline = new LazyMatcher(() => new MatchesJsonObject( |
1101 "Outline", { | 1040 "Outline", {"element": isElement, "offset": isInt, "length": isInt}, |
1102 "element": isElement, | 1041 optionalFields: {"children": isListOf(isOutline)})); |
1103 "offset": isInt, | |
1104 "length": isInt | |
1105 }, optionalFields: { | |
1106 "children": isListOf(isOutline) | |
1107 })); | |
1108 | 1042 |
1109 /** | 1043 /** |
1110 * Position | 1044 * Position |
1111 * | 1045 * |
1112 * { | 1046 * { |
1113 * "file": FilePath | 1047 * "file": FilePath |
1114 * "offset": int | 1048 * "offset": int |
1115 * } | 1049 * } |
1116 */ | 1050 */ |
1117 final Matcher isPosition = new LazyMatcher(() => new MatchesJsonObject( | 1051 final Matcher isPosition = new LazyMatcher(() => |
1118 "Position", { | 1052 new MatchesJsonObject("Position", {"file": isFilePath, "offset": isInt})); |
1119 "file": isFilePath, | |
1120 "offset": isInt | |
1121 })); | |
1122 | 1053 |
1123 /** | 1054 /** |
1124 * PrioritizedSourceChange | 1055 * PrioritizedSourceChange |
1125 * | 1056 * |
1126 * { | 1057 * { |
1127 * "priority": int | 1058 * "priority": int |
1128 * "change": SourceChange | 1059 * "change": SourceChange |
1129 * } | 1060 * } |
1130 */ | 1061 */ |
1131 final Matcher isPrioritizedSourceChange = new LazyMatcher(() => new MatchesJsonO
bject( | 1062 final Matcher isPrioritizedSourceChange = new LazyMatcher(() => |
1132 "PrioritizedSourceChange", { | 1063 new MatchesJsonObject("PrioritizedSourceChange", |
1133 "priority": isInt, | 1064 {"priority": isInt, "change": isSourceChange})); |
1134 "change": isSourceChange | |
1135 })); | |
1136 | 1065 |
1137 /** | 1066 /** |
1138 * RefactoringFeedback | 1067 * RefactoringFeedback |
1139 * | 1068 * |
1140 * { | 1069 * { |
1141 * } | 1070 * } |
1142 */ | 1071 */ |
1143 final Matcher isRefactoringFeedback = new LazyMatcher(() => new MatchesJsonObjec
t( | 1072 final Matcher isRefactoringFeedback = |
1144 "RefactoringFeedback", null)); | 1073 new LazyMatcher(() => new MatchesJsonObject("RefactoringFeedback", null)); |
1145 | 1074 |
1146 /** | 1075 /** |
1147 * RefactoringKind | 1076 * RefactoringKind |
1148 * | 1077 * |
1149 * enum { | 1078 * enum { |
1150 * CONVERT_GETTER_TO_METHOD | 1079 * CONVERT_GETTER_TO_METHOD |
1151 * CONVERT_METHOD_TO_GETTER | 1080 * CONVERT_METHOD_TO_GETTER |
1152 * EXTRACT_LOCAL_VARIABLE | 1081 * EXTRACT_LOCAL_VARIABLE |
1153 * EXTRACT_METHOD | 1082 * EXTRACT_METHOD |
1154 * INLINE_LOCAL_VARIABLE | 1083 * INLINE_LOCAL_VARIABLE |
(...skipping 19 matching lines...) Expand all Loading... |
1174 * RefactoringMethodParameter | 1103 * RefactoringMethodParameter |
1175 * | 1104 * |
1176 * { | 1105 * { |
1177 * "id": optional String | 1106 * "id": optional String |
1178 * "kind": RefactoringMethodParameterKind | 1107 * "kind": RefactoringMethodParameterKind |
1179 * "type": String | 1108 * "type": String |
1180 * "name": String | 1109 * "name": String |
1181 * "parameters": optional String | 1110 * "parameters": optional String |
1182 * } | 1111 * } |
1183 */ | 1112 */ |
1184 final Matcher isRefactoringMethodParameter = new LazyMatcher(() => new MatchesJs
onObject( | 1113 final Matcher isRefactoringMethodParameter = new LazyMatcher(() => |
1185 "RefactoringMethodParameter", { | 1114 new MatchesJsonObject("RefactoringMethodParameter", { |
1186 "kind": isRefactoringMethodParameterKind, | 1115 "kind": isRefactoringMethodParameterKind, |
1187 "type": isString, | 1116 "type": isString, |
1188 "name": isString | 1117 "name": isString |
1189 }, optionalFields: { | 1118 }, optionalFields: { |
1190 "id": isString, | 1119 "id": isString, |
1191 "parameters": isString | 1120 "parameters": isString |
1192 })); | 1121 })); |
1193 | 1122 |
1194 /** | 1123 /** |
1195 * RefactoringOptions | 1124 * RefactoringOptions |
1196 * | 1125 * |
1197 * { | 1126 * { |
1198 * } | 1127 * } |
1199 */ | 1128 */ |
1200 final Matcher isRefactoringOptions = new LazyMatcher(() => new MatchesJsonObject
( | 1129 final Matcher isRefactoringOptions = |
1201 "RefactoringOptions", null)); | 1130 new LazyMatcher(() => new MatchesJsonObject("RefactoringOptions", null)); |
1202 | 1131 |
1203 /** | 1132 /** |
1204 * RefactoringMethodParameterKind | 1133 * RefactoringMethodParameterKind |
1205 * | 1134 * |
1206 * enum { | 1135 * enum { |
1207 * REQUIRED | 1136 * REQUIRED |
1208 * POSITIONAL | 1137 * POSITIONAL |
1209 * NAMED | 1138 * NAMED |
1210 * } | 1139 * } |
1211 */ | 1140 */ |
1212 final Matcher isRefactoringMethodParameterKind = new MatchesEnum("RefactoringMet
hodParameterKind", [ | 1141 final Matcher isRefactoringMethodParameterKind = new MatchesEnum( |
1213 "REQUIRED", | 1142 "RefactoringMethodParameterKind", ["REQUIRED", "POSITIONAL", "NAMED"]); |
1214 "POSITIONAL", | |
1215 "NAMED" | |
1216 ]); | |
1217 | 1143 |
1218 /** | 1144 /** |
1219 * RefactoringProblem | 1145 * RefactoringProblem |
1220 * | 1146 * |
1221 * { | 1147 * { |
1222 * "severity": RefactoringProblemSeverity | 1148 * "severity": RefactoringProblemSeverity |
1223 * "message": String | 1149 * "message": String |
1224 * "location": optional Location | 1150 * "location": optional Location |
1225 * } | 1151 * } |
1226 */ | 1152 */ |
1227 final Matcher isRefactoringProblem = new LazyMatcher(() => new MatchesJsonObject
( | 1153 final Matcher isRefactoringProblem = new LazyMatcher(() => |
1228 "RefactoringProblem", { | 1154 new MatchesJsonObject("RefactoringProblem", |
1229 "severity": isRefactoringProblemSeverity, | 1155 {"severity": isRefactoringProblemSeverity, "message": isString}, |
1230 "message": isString | 1156 optionalFields: {"location": isLocation})); |
1231 }, optionalFields: { | |
1232 "location": isLocation | |
1233 })); | |
1234 | 1157 |
1235 /** | 1158 /** |
1236 * RefactoringProblemSeverity | 1159 * RefactoringProblemSeverity |
1237 * | 1160 * |
1238 * enum { | 1161 * enum { |
1239 * INFO | 1162 * INFO |
1240 * WARNING | 1163 * WARNING |
1241 * ERROR | 1164 * ERROR |
1242 * FATAL | 1165 * FATAL |
1243 * } | 1166 * } |
1244 */ | 1167 */ |
1245 final Matcher isRefactoringProblemSeverity = new MatchesEnum("RefactoringProblem
Severity", [ | 1168 final Matcher isRefactoringProblemSeverity = new MatchesEnum( |
1246 "INFO", | 1169 "RefactoringProblemSeverity", ["INFO", "WARNING", "ERROR", "FATAL"]); |
1247 "WARNING", | |
1248 "ERROR", | |
1249 "FATAL" | |
1250 ]); | |
1251 | 1170 |
1252 /** | 1171 /** |
1253 * RemoveContentOverlay | 1172 * RemoveContentOverlay |
1254 * | 1173 * |
1255 * { | 1174 * { |
1256 * "type": "remove" | 1175 * "type": "remove" |
1257 * } | 1176 * } |
1258 */ | 1177 */ |
1259 final Matcher isRemoveContentOverlay = new LazyMatcher(() => new MatchesJsonObje
ct( | 1178 final Matcher isRemoveContentOverlay = new LazyMatcher(() => |
1260 "RemoveContentOverlay", { | 1179 new MatchesJsonObject("RemoveContentOverlay", {"type": equals("remove")})); |
1261 "type": equals("remove") | |
1262 })); | |
1263 | 1180 |
1264 /** | 1181 /** |
1265 * RequestError | 1182 * RequestError |
1266 * | 1183 * |
1267 * { | 1184 * { |
1268 * "code": RequestErrorCode | 1185 * "code": RequestErrorCode |
1269 * "message": String | 1186 * "message": String |
1270 * "stackTrace": optional String | 1187 * "stackTrace": optional String |
1271 * } | 1188 * } |
1272 */ | 1189 */ |
1273 final Matcher isRequestError = new LazyMatcher(() => new MatchesJsonObject( | 1190 final Matcher isRequestError = new LazyMatcher(() => new MatchesJsonObject( |
1274 "RequestError", { | 1191 "RequestError", {"code": isRequestErrorCode, "message": isString}, |
1275 "code": isRequestErrorCode, | 1192 optionalFields: {"stackTrace": isString})); |
1276 "message": isString | |
1277 }, optionalFields: { | |
1278 "stackTrace": isString | |
1279 })); | |
1280 | 1193 |
1281 /** | 1194 /** |
1282 * RequestErrorCode | 1195 * RequestErrorCode |
1283 * | 1196 * |
1284 * enum { | 1197 * enum { |
1285 * INVALID_OVERLAY_CHANGE | 1198 * INVALID_OVERLAY_CHANGE |
1286 * INVALID_PARAMETER | 1199 * INVALID_PARAMETER |
1287 * PLUGIN_ERROR | 1200 * PLUGIN_ERROR |
1288 * UNKNOWN_REQUEST | 1201 * UNKNOWN_REQUEST |
1289 * } | 1202 * } |
1290 */ | 1203 */ |
1291 final Matcher isRequestErrorCode = new MatchesEnum("RequestErrorCode", [ | 1204 final Matcher isRequestErrorCode = new MatchesEnum("RequestErrorCode", [ |
1292 "INVALID_OVERLAY_CHANGE", | 1205 "INVALID_OVERLAY_CHANGE", |
1293 "INVALID_PARAMETER", | 1206 "INVALID_PARAMETER", |
1294 "PLUGIN_ERROR", | 1207 "PLUGIN_ERROR", |
1295 "UNKNOWN_REQUEST" | 1208 "UNKNOWN_REQUEST" |
1296 ]); | 1209 ]); |
1297 | 1210 |
1298 /** | 1211 /** |
1299 * SourceChange | 1212 * SourceChange |
1300 * | 1213 * |
1301 * { | 1214 * { |
1302 * "message": String | 1215 * "message": String |
1303 * "edits": List<SourceFileEdit> | 1216 * "edits": List<SourceFileEdit> |
1304 * "linkedEditGroups": List<LinkedEditGroup> | 1217 * "linkedEditGroups": List<LinkedEditGroup> |
1305 * "selection": optional Position | 1218 * "selection": optional Position |
1306 * } | 1219 * } |
1307 */ | 1220 */ |
1308 final Matcher isSourceChange = new LazyMatcher(() => new MatchesJsonObject( | 1221 final Matcher isSourceChange = |
1309 "SourceChange", { | 1222 new LazyMatcher(() => new MatchesJsonObject("SourceChange", { |
1310 "message": isString, | 1223 "message": isString, |
1311 "edits": isListOf(isSourceFileEdit), | 1224 "edits": isListOf(isSourceFileEdit), |
1312 "linkedEditGroups": isListOf(isLinkedEditGroup) | 1225 "linkedEditGroups": isListOf(isLinkedEditGroup) |
1313 }, optionalFields: { | 1226 }, optionalFields: { |
1314 "selection": isPosition | 1227 "selection": isPosition |
1315 })); | 1228 })); |
1316 | 1229 |
1317 /** | 1230 /** |
1318 * SourceEdit | 1231 * SourceEdit |
1319 * | 1232 * |
1320 * { | 1233 * { |
1321 * "offset": int | 1234 * "offset": int |
1322 * "length": int | 1235 * "length": int |
1323 * "replacement": String | 1236 * "replacement": String |
1324 * "id": optional String | 1237 * "id": optional String |
1325 * } | 1238 * } |
1326 */ | 1239 */ |
1327 final Matcher isSourceEdit = new LazyMatcher(() => new MatchesJsonObject( | 1240 final Matcher isSourceEdit = new LazyMatcher(() => new MatchesJsonObject( |
1328 "SourceEdit", { | 1241 "SourceEdit", {"offset": isInt, "length": isInt, "replacement": isString}, |
1329 "offset": isInt, | 1242 optionalFields: {"id": isString})); |
1330 "length": isInt, | |
1331 "replacement": isString | |
1332 }, optionalFields: { | |
1333 "id": isString | |
1334 })); | |
1335 | 1243 |
1336 /** | 1244 /** |
1337 * SourceFileEdit | 1245 * SourceFileEdit |
1338 * | 1246 * |
1339 * { | 1247 * { |
1340 * "file": FilePath | 1248 * "file": FilePath |
1341 * "fileStamp": long | 1249 * "fileStamp": long |
1342 * "edits": List<SourceEdit> | 1250 * "edits": List<SourceEdit> |
1343 * } | 1251 * } |
1344 */ | 1252 */ |
1345 final Matcher isSourceFileEdit = new LazyMatcher(() => new MatchesJsonObject( | 1253 final Matcher isSourceFileEdit = new LazyMatcher(() => new MatchesJsonObject( |
1346 "SourceFileEdit", { | 1254 "SourceFileEdit", |
1347 "file": isFilePath, | 1255 {"file": isFilePath, "fileStamp": isInt, "edits": isListOf(isSourceEdit)})); |
1348 "fileStamp": isInt, | |
1349 "edits": isListOf(isSourceEdit) | |
1350 })); | |
1351 | 1256 |
1352 /** | 1257 /** |
1353 * WatchEvent | 1258 * WatchEvent |
1354 * | 1259 * |
1355 * { | 1260 * { |
1356 * "type": WatchEventType | 1261 * "type": WatchEventType |
1357 * "path": String | 1262 * "path": String |
1358 * } | 1263 * } |
1359 */ | 1264 */ |
1360 final Matcher isWatchEvent = new LazyMatcher(() => new MatchesJsonObject( | 1265 final Matcher isWatchEvent = new LazyMatcher(() => new MatchesJsonObject( |
1361 "WatchEvent", { | 1266 "WatchEvent", {"type": isWatchEventType, "path": isString})); |
1362 "type": isWatchEventType, | |
1363 "path": isString | |
1364 })); | |
1365 | 1267 |
1366 /** | 1268 /** |
1367 * WatchEventType | 1269 * WatchEventType |
1368 * | 1270 * |
1369 * enum { | 1271 * enum { |
1370 * ADD | 1272 * ADD |
1371 * MODIFY | 1273 * MODIFY |
1372 * REMOVE | 1274 * REMOVE |
1373 * } | 1275 * } |
1374 */ | 1276 */ |
1375 final Matcher isWatchEventType = new MatchesEnum("WatchEventType", [ | 1277 final Matcher isWatchEventType = |
1376 "ADD", | 1278 new MatchesEnum("WatchEventType", ["ADD", "MODIFY", "REMOVE"]); |
1377 "MODIFY", | |
1378 "REMOVE" | |
1379 ]); | |
1380 | 1279 |
1381 /** | 1280 /** |
1382 * convertGetterToMethod feedback | 1281 * convertGetterToMethod feedback |
1383 */ | 1282 */ |
1384 final Matcher isConvertGetterToMethodFeedback = isNull; | 1283 final Matcher isConvertGetterToMethodFeedback = isNull; |
1385 | 1284 |
1386 /** | 1285 /** |
1387 * convertGetterToMethod options | 1286 * convertGetterToMethod options |
1388 */ | 1287 */ |
1389 final Matcher isConvertGetterToMethodOptions = isNull; | 1288 final Matcher isConvertGetterToMethodOptions = isNull; |
(...skipping 12 matching lines...) Expand all Loading... |
1402 * extractLocalVariable feedback | 1301 * extractLocalVariable feedback |
1403 * | 1302 * |
1404 * { | 1303 * { |
1405 * "coveringExpressionOffsets": optional List<int> | 1304 * "coveringExpressionOffsets": optional List<int> |
1406 * "coveringExpressionLengths": optional List<int> | 1305 * "coveringExpressionLengths": optional List<int> |
1407 * "names": List<String> | 1306 * "names": List<String> |
1408 * "offsets": List<int> | 1307 * "offsets": List<int> |
1409 * "lengths": List<int> | 1308 * "lengths": List<int> |
1410 * } | 1309 * } |
1411 */ | 1310 */ |
1412 final Matcher isExtractLocalVariableFeedback = new LazyMatcher(() => new Matches
JsonObject( | 1311 final Matcher isExtractLocalVariableFeedback = new LazyMatcher( |
1413 "extractLocalVariable feedback", { | 1312 () => new MatchesJsonObject("extractLocalVariable feedback", { |
1414 "names": isListOf(isString), | 1313 "names": isListOf(isString), |
1415 "offsets": isListOf(isInt), | 1314 "offsets": isListOf(isInt), |
1416 "lengths": isListOf(isInt) | 1315 "lengths": isListOf(isInt) |
1417 }, optionalFields: { | 1316 }, optionalFields: { |
1418 "coveringExpressionOffsets": isListOf(isInt), | 1317 "coveringExpressionOffsets": isListOf(isInt), |
1419 "coveringExpressionLengths": isListOf(isInt) | 1318 "coveringExpressionLengths": isListOf(isInt) |
1420 })); | 1319 })); |
1421 | 1320 |
1422 /** | 1321 /** |
1423 * extractLocalVariable options | 1322 * extractLocalVariable options |
1424 * | 1323 * |
1425 * { | 1324 * { |
1426 * "name": String | 1325 * "name": String |
1427 * "extractAll": bool | 1326 * "extractAll": bool |
1428 * } | 1327 * } |
1429 */ | 1328 */ |
1430 final Matcher isExtractLocalVariableOptions = new LazyMatcher(() => new MatchesJ
sonObject( | 1329 final Matcher isExtractLocalVariableOptions = new LazyMatcher(() => |
1431 "extractLocalVariable options", { | 1330 new MatchesJsonObject("extractLocalVariable options", |
1432 "name": isString, | 1331 {"name": isString, "extractAll": isBool})); |
1433 "extractAll": isBool | |
1434 })); | |
1435 | 1332 |
1436 /** | 1333 /** |
1437 * extractMethod feedback | 1334 * extractMethod feedback |
1438 * | 1335 * |
1439 * { | 1336 * { |
1440 * "offset": int | 1337 * "offset": int |
1441 * "length": int | 1338 * "length": int |
1442 * "returnType": String | 1339 * "returnType": String |
1443 * "names": List<String> | 1340 * "names": List<String> |
1444 * "canCreateGetter": bool | 1341 * "canCreateGetter": bool |
1445 * "parameters": List<RefactoringMethodParameter> | 1342 * "parameters": List<RefactoringMethodParameter> |
1446 * "offsets": List<int> | 1343 * "offsets": List<int> |
1447 * "lengths": List<int> | 1344 * "lengths": List<int> |
1448 * } | 1345 * } |
1449 */ | 1346 */ |
1450 final Matcher isExtractMethodFeedback = new LazyMatcher(() => new MatchesJsonObj
ect( | 1347 final Matcher isExtractMethodFeedback = |
1451 "extractMethod feedback", { | 1348 new LazyMatcher(() => new MatchesJsonObject("extractMethod feedback", { |
1452 "offset": isInt, | 1349 "offset": isInt, |
1453 "length": isInt, | 1350 "length": isInt, |
1454 "returnType": isString, | 1351 "returnType": isString, |
1455 "names": isListOf(isString), | 1352 "names": isListOf(isString), |
1456 "canCreateGetter": isBool, | 1353 "canCreateGetter": isBool, |
1457 "parameters": isListOf(isRefactoringMethodParameter), | 1354 "parameters": isListOf(isRefactoringMethodParameter), |
1458 "offsets": isListOf(isInt), | 1355 "offsets": isListOf(isInt), |
1459 "lengths": isListOf(isInt) | 1356 "lengths": isListOf(isInt) |
1460 })); | 1357 })); |
1461 | 1358 |
1462 /** | 1359 /** |
1463 * extractMethod options | 1360 * extractMethod options |
1464 * | 1361 * |
1465 * { | 1362 * { |
1466 * "returnType": String | 1363 * "returnType": String |
1467 * "createGetter": bool | 1364 * "createGetter": bool |
1468 * "name": String | 1365 * "name": String |
1469 * "parameters": List<RefactoringMethodParameter> | 1366 * "parameters": List<RefactoringMethodParameter> |
1470 * "extractAll": bool | 1367 * "extractAll": bool |
1471 * } | 1368 * } |
1472 */ | 1369 */ |
1473 final Matcher isExtractMethodOptions = new LazyMatcher(() => new MatchesJsonObje
ct( | 1370 final Matcher isExtractMethodOptions = |
1474 "extractMethod options", { | 1371 new LazyMatcher(() => new MatchesJsonObject("extractMethod options", { |
1475 "returnType": isString, | 1372 "returnType": isString, |
1476 "createGetter": isBool, | 1373 "createGetter": isBool, |
1477 "name": isString, | 1374 "name": isString, |
1478 "parameters": isListOf(isRefactoringMethodParameter), | 1375 "parameters": isListOf(isRefactoringMethodParameter), |
1479 "extractAll": isBool | 1376 "extractAll": isBool |
1480 })); | 1377 })); |
1481 | 1378 |
1482 /** | 1379 /** |
1483 * inlineLocalVariable feedback | 1380 * inlineLocalVariable feedback |
1484 * | 1381 * |
1485 * { | 1382 * { |
1486 * "name": String | 1383 * "name": String |
1487 * "occurrences": int | 1384 * "occurrences": int |
1488 * } | 1385 * } |
1489 */ | 1386 */ |
1490 final Matcher isInlineLocalVariableFeedback = new LazyMatcher(() => new MatchesJ
sonObject( | 1387 final Matcher isInlineLocalVariableFeedback = new LazyMatcher(() => |
1491 "inlineLocalVariable feedback", { | 1388 new MatchesJsonObject("inlineLocalVariable feedback", |
1492 "name": isString, | 1389 {"name": isString, "occurrences": isInt})); |
1493 "occurrences": isInt | |
1494 })); | |
1495 | 1390 |
1496 /** | 1391 /** |
1497 * inlineLocalVariable options | 1392 * inlineLocalVariable options |
1498 */ | 1393 */ |
1499 final Matcher isInlineLocalVariableOptions = isNull; | 1394 final Matcher isInlineLocalVariableOptions = isNull; |
1500 | 1395 |
1501 /** | 1396 /** |
1502 * inlineMethod feedback | 1397 * inlineMethod feedback |
1503 * | 1398 * |
1504 * { | 1399 * { |
1505 * "className": optional String | 1400 * "className": optional String |
1506 * "methodName": String | 1401 * "methodName": String |
1507 * "isDeclaration": bool | 1402 * "isDeclaration": bool |
1508 * } | 1403 * } |
1509 */ | 1404 */ |
1510 final Matcher isInlineMethodFeedback = new LazyMatcher(() => new MatchesJsonObje
ct( | 1405 final Matcher isInlineMethodFeedback = new LazyMatcher(() => |
1511 "inlineMethod feedback", { | 1406 new MatchesJsonObject("inlineMethod feedback", |
1512 "methodName": isString, | 1407 {"methodName": isString, "isDeclaration": isBool}, |
1513 "isDeclaration": isBool | 1408 optionalFields: {"className": isString})); |
1514 }, optionalFields: { | |
1515 "className": isString | |
1516 })); | |
1517 | 1409 |
1518 /** | 1410 /** |
1519 * inlineMethod options | 1411 * inlineMethod options |
1520 * | 1412 * |
1521 * { | 1413 * { |
1522 * "deleteSource": bool | 1414 * "deleteSource": bool |
1523 * "inlineAll": bool | 1415 * "inlineAll": bool |
1524 * } | 1416 * } |
1525 */ | 1417 */ |
1526 final Matcher isInlineMethodOptions = new LazyMatcher(() => new MatchesJsonObjec
t( | 1418 final Matcher isInlineMethodOptions = new LazyMatcher(() => |
1527 "inlineMethod options", { | 1419 new MatchesJsonObject( |
1528 "deleteSource": isBool, | 1420 "inlineMethod options", {"deleteSource": isBool, "inlineAll": isBool})); |
1529 "inlineAll": isBool | |
1530 })); | |
1531 | 1421 |
1532 /** | 1422 /** |
1533 * moveFile feedback | 1423 * moveFile feedback |
1534 */ | 1424 */ |
1535 final Matcher isMoveFileFeedback = isNull; | 1425 final Matcher isMoveFileFeedback = isNull; |
1536 | 1426 |
1537 /** | 1427 /** |
1538 * moveFile options | 1428 * moveFile options |
1539 * | 1429 * |
1540 * { | 1430 * { |
1541 * "newFile": FilePath | 1431 * "newFile": FilePath |
1542 * } | 1432 * } |
1543 */ | 1433 */ |
1544 final Matcher isMoveFileOptions = new LazyMatcher(() => new MatchesJsonObject( | 1434 final Matcher isMoveFileOptions = new LazyMatcher( |
1545 "moveFile options", { | 1435 () => new MatchesJsonObject("moveFile options", {"newFile": isFilePath})); |
1546 "newFile": isFilePath | |
1547 })); | |
1548 | 1436 |
1549 /** | 1437 /** |
1550 * rename feedback | 1438 * rename feedback |
1551 * | 1439 * |
1552 * { | 1440 * { |
1553 * "offset": int | 1441 * "offset": int |
1554 * "length": int | 1442 * "length": int |
1555 * "elementKindName": String | 1443 * "elementKindName": String |
1556 * "oldName": String | 1444 * "oldName": String |
1557 * } | 1445 * } |
1558 */ | 1446 */ |
1559 final Matcher isRenameFeedback = new LazyMatcher(() => new MatchesJsonObject( | 1447 final Matcher isRenameFeedback = |
1560 "rename feedback", { | 1448 new LazyMatcher(() => new MatchesJsonObject("rename feedback", { |
1561 "offset": isInt, | 1449 "offset": isInt, |
1562 "length": isInt, | 1450 "length": isInt, |
1563 "elementKindName": isString, | 1451 "elementKindName": isString, |
1564 "oldName": isString | 1452 "oldName": isString |
1565 })); | 1453 })); |
1566 | 1454 |
1567 /** | 1455 /** |
1568 * rename options | 1456 * rename options |
1569 * | 1457 * |
1570 * { | 1458 * { |
1571 * "newName": String | 1459 * "newName": String |
1572 * } | 1460 * } |
1573 */ | 1461 */ |
1574 final Matcher isRenameOptions = new LazyMatcher(() => new MatchesJsonObject( | 1462 final Matcher isRenameOptions = new LazyMatcher( |
1575 "rename options", { | 1463 () => new MatchesJsonObject("rename options", {"newName": isString})); |
1576 "newName": isString | |
1577 })); | |
1578 | |
OLD | NEW |