Chromium Code Reviews| 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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 264 return unit; | 264 return unit; |
| 265 } | 265 } |
| 266 unit = entry.getValue(RESOLVED_UNIT7); | 266 unit = entry.getValue(RESOLVED_UNIT7); |
| 267 if (unit != null) { | 267 if (unit != null) { |
| 268 return unit; | 268 return unit; |
| 269 } | 269 } |
| 270 unit = entry.getValue(RESOLVED_UNIT8); | 270 unit = entry.getValue(RESOLVED_UNIT8); |
| 271 if (unit != null) { | 271 if (unit != null) { |
| 272 return unit; | 272 return unit; |
| 273 } | 273 } |
| 274 unit = entry.getValue(RESOLVED_UNIT9); | |
|
Leaf
2015/10/13 05:35:47
I clearly missed this in a previous renumbering CL
Brian Wilkerson
2015/10/13 14:21:19
I agree. This is very brittle and it's on the list
| |
| 275 if (unit != null) { | |
| 276 return unit; | |
| 277 } | |
| 278 unit = entry.getValue(RESOLVED_UNIT10); | |
| 279 if (unit != null) { | |
| 280 return unit; | |
| 281 } | |
| 274 return entry.getValue(RESOLVED_UNIT); | 282 return entry.getValue(RESOLVED_UNIT); |
| 275 } | 283 } |
| 276 | 284 |
| 277 /** | 285 /** |
| 278 * Return a list of the result descriptors whose state should be displayed for | 286 * Return a list of the result descriptors whose state should be displayed for |
| 279 * the given cache [entry]. | 287 * the given cache [entry]. |
| 280 */ | 288 */ |
| 281 List<ResultDescriptor> _getExpectedResults(CacheEntry entry) { | 289 List<ResultDescriptor> _getExpectedResults(CacheEntry entry) { |
| 282 AnalysisTarget target = entry.target; | 290 AnalysisTarget target = entry.target; |
| 283 Set<ResultDescriptor> results = entry.nonInvalidResults.toSet(); | 291 Set<ResultDescriptor> results = entry.nonInvalidResults.toSet(); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 330 results.add(RESOLVE_TYPE_NAMES_ERRORS); | 338 results.add(RESOLVE_TYPE_NAMES_ERRORS); |
| 331 results.add(RESOLVE_UNIT_ERRORS); | 339 results.add(RESOLVE_UNIT_ERRORS); |
| 332 results.add(RESOLVED_UNIT1); | 340 results.add(RESOLVED_UNIT1); |
| 333 results.add(RESOLVED_UNIT2); | 341 results.add(RESOLVED_UNIT2); |
| 334 results.add(RESOLVED_UNIT3); | 342 results.add(RESOLVED_UNIT3); |
| 335 results.add(RESOLVED_UNIT4); | 343 results.add(RESOLVED_UNIT4); |
| 336 results.add(RESOLVED_UNIT5); | 344 results.add(RESOLVED_UNIT5); |
| 337 results.add(RESOLVED_UNIT6); | 345 results.add(RESOLVED_UNIT6); |
| 338 results.add(RESOLVED_UNIT7); | 346 results.add(RESOLVED_UNIT7); |
| 339 results.add(RESOLVED_UNIT8); | 347 results.add(RESOLVED_UNIT8); |
| 348 results.add(RESOLVED_UNIT9); | |
|
Jennifer Messerly
2015/10/13 15:23:52
I forgot to ask yesterday ... do we need the old B
Brian Wilkerson
2015/10/13 15:37:37
Yes, the names are poor. I'm currently in the proc
| |
| 349 results.add(RESOLVED_UNIT10); | |
| 340 results.add(RESOLVED_UNIT); | 350 results.add(RESOLVED_UNIT); |
| 351 results.add(STRONG_MODE_ERRORS); | |
| 341 results.add(USED_IMPORTED_ELEMENTS); | 352 results.add(USED_IMPORTED_ELEMENTS); |
| 342 results.add(USED_LOCAL_ELEMENTS); | 353 results.add(USED_LOCAL_ELEMENTS); |
| 343 results.add(VARIABLE_REFERENCE_ERRORS); | 354 results.add(VARIABLE_REFERENCE_ERRORS); |
| 344 results.add(VERIFY_ERRORS); | 355 results.add(VERIFY_ERRORS); |
| 345 } else if (target is ConstantEvaluationTarget) { | 356 } else if (target is ConstantEvaluationTarget) { |
| 346 results.add(CONSTANT_DEPENDENCIES); | 357 results.add(CONSTANT_DEPENDENCIES); |
| 347 results.add(CONSTANT_VALUE); | 358 results.add(CONSTANT_VALUE); |
| 348 if (target is VariableElement) { | 359 if (target is VariableElement) { |
| 349 results.add(INFERABLE_STATIC_VARIABLE_DEPENDENCIES); | 360 results.add(INFERABLE_STATIC_VARIABLE_DEPENDENCIES); |
| 350 results.add(INFERRED_STATIC_VARIABLE); | 361 results.add(INFERRED_STATIC_VARIABLE); |
| (...skipping 1533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1884 */ | 1895 */ |
| 1885 static String makeLink( | 1896 static String makeLink( |
| 1886 String path, Map<String, String> params, String innerHtml, | 1897 String path, Map<String, String> params, String innerHtml, |
| 1887 [bool hasError = false]) { | 1898 [bool hasError = false]) { |
| 1888 Uri uri = new Uri(path: path, queryParameters: params); | 1899 Uri uri = new Uri(path: path, queryParameters: params); |
| 1889 String href = HTML_ESCAPE.convert(uri.toString()); | 1900 String href = HTML_ESCAPE.convert(uri.toString()); |
| 1890 String classAttribute = hasError ? ' class="error"' : ''; | 1901 String classAttribute = hasError ? ' class="error"' : ''; |
| 1891 return '<a href="$href"$classAttribute>$innerHtml</a>'; | 1902 return '<a href="$href"$classAttribute>$innerHtml</a>'; |
| 1892 } | 1903 } |
| 1893 } | 1904 } |
| OLD | NEW |