OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 library analysis_server.src.status.get_handler; | 5 library analysis_server.src.status.get_handler; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:collection'; | 8 import 'dart:collection'; |
9 import 'dart:convert'; | 9 import 'dart:convert'; |
10 import 'dart:io'; | 10 import 'dart:io'; |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 return unit; | 275 return unit; |
276 } | 276 } |
277 unit = entry.getValue(RESOLVED_UNIT9); | 277 unit = entry.getValue(RESOLVED_UNIT9); |
278 if (unit != null) { | 278 if (unit != null) { |
279 return unit; | 279 return unit; |
280 } | 280 } |
281 unit = entry.getValue(RESOLVED_UNIT10); | 281 unit = entry.getValue(RESOLVED_UNIT10); |
282 if (unit != null) { | 282 if (unit != null) { |
283 return unit; | 283 return unit; |
284 } | 284 } |
| 285 unit = entry.getValue(RESOLVED_UNIT11); |
| 286 if (unit != null) { |
| 287 return unit; |
| 288 } |
285 return entry.getValue(RESOLVED_UNIT); | 289 return entry.getValue(RESOLVED_UNIT); |
286 } | 290 } |
287 | 291 |
288 /** | 292 /** |
289 * Return a list of the result descriptors whose state should be displayed for | 293 * Return a list of the result descriptors whose state should be displayed for |
290 * the given cache [entry]. | 294 * the given cache [entry]. |
291 */ | 295 */ |
292 List<ResultDescriptor> _getExpectedResults(CacheEntry entry) { | 296 List<ResultDescriptor> _getExpectedResults(CacheEntry entry) { |
293 AnalysisTarget target = entry.target; | 297 AnalysisTarget target = entry.target; |
294 Set<ResultDescriptor> results = entry.nonInvalidResults.toSet(); | 298 Set<ResultDescriptor> results = entry.nonInvalidResults.toSet(); |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 results.add(RESOLVED_UNIT1); | 347 results.add(RESOLVED_UNIT1); |
344 results.add(RESOLVED_UNIT2); | 348 results.add(RESOLVED_UNIT2); |
345 results.add(RESOLVED_UNIT3); | 349 results.add(RESOLVED_UNIT3); |
346 results.add(RESOLVED_UNIT4); | 350 results.add(RESOLVED_UNIT4); |
347 results.add(RESOLVED_UNIT5); | 351 results.add(RESOLVED_UNIT5); |
348 results.add(RESOLVED_UNIT6); | 352 results.add(RESOLVED_UNIT6); |
349 results.add(RESOLVED_UNIT7); | 353 results.add(RESOLVED_UNIT7); |
350 results.add(RESOLVED_UNIT8); | 354 results.add(RESOLVED_UNIT8); |
351 results.add(RESOLVED_UNIT9); | 355 results.add(RESOLVED_UNIT9); |
352 results.add(RESOLVED_UNIT10); | 356 results.add(RESOLVED_UNIT10); |
| 357 results.add(RESOLVED_UNIT11); |
353 results.add(RESOLVED_UNIT); | 358 results.add(RESOLVED_UNIT); |
354 results.add(STRONG_MODE_ERRORS); | 359 results.add(STRONG_MODE_ERRORS); |
355 results.add(USED_IMPORTED_ELEMENTS); | 360 results.add(USED_IMPORTED_ELEMENTS); |
356 results.add(USED_LOCAL_ELEMENTS); | 361 results.add(USED_LOCAL_ELEMENTS); |
357 results.add(VARIABLE_REFERENCE_ERRORS); | 362 results.add(VARIABLE_REFERENCE_ERRORS); |
358 results.add(VERIFY_ERRORS); | 363 results.add(VERIFY_ERRORS); |
359 } else if (target is ConstantEvaluationTarget) { | 364 } else if (target is ConstantEvaluationTarget) { |
360 results.add(CONSTANT_DEPENDENCIES); | 365 results.add(CONSTANT_DEPENDENCIES); |
361 results.add(CONSTANT_VALUE); | 366 results.add(CONSTANT_VALUE); |
362 if (target is VariableElement) { | 367 if (target is VariableElement) { |
(...skipping 1577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1940 */ | 1945 */ |
1941 static String makeLink( | 1946 static String makeLink( |
1942 String path, Map<String, String> params, String innerHtml, | 1947 String path, Map<String, String> params, String innerHtml, |
1943 [bool hasError = false]) { | 1948 [bool hasError = false]) { |
1944 Uri uri = new Uri(path: path, queryParameters: params); | 1949 Uri uri = new Uri(path: path, queryParameters: params); |
1945 String href = HTML_ESCAPE.convert(uri.toString()); | 1950 String href = HTML_ESCAPE.convert(uri.toString()); |
1946 String classAttribute = hasError ? ' class="error"' : ''; | 1951 String classAttribute = hasError ? ' class="error"' : ''; |
1947 return '<a href="$href"$classAttribute>$innerHtml</a>'; | 1952 return '<a href="$href"$classAttribute>$innerHtml</a>'; |
1948 } | 1953 } |
1949 } | 1954 } |
OLD | NEW |