| 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 15 matching lines...) Expand all Loading... |
| 26 import 'package:analysis_server/src/status/ast_writer.dart'; | 26 import 'package:analysis_server/src/status/ast_writer.dart'; |
| 27 import 'package:analysis_server/src/status/element_writer.dart'; | 27 import 'package:analysis_server/src/status/element_writer.dart'; |
| 28 import 'package:analysis_server/src/status/validator.dart'; | 28 import 'package:analysis_server/src/status/validator.dart'; |
| 29 import 'package:analysis_server/src/utilities/average.dart'; | 29 import 'package:analysis_server/src/utilities/average.dart'; |
| 30 import 'package:analyzer/dart/element/element.dart'; | 30 import 'package:analyzer/dart/element/element.dart'; |
| 31 import 'package:analyzer/dart/element/visitor.dart'; | 31 import 'package:analyzer/dart/element/visitor.dart'; |
| 32 import 'package:analyzer/file_system/file_system.dart'; | 32 import 'package:analyzer/file_system/file_system.dart'; |
| 33 import 'package:analyzer/source/error_processor.dart'; | 33 import 'package:analyzer/source/error_processor.dart'; |
| 34 import 'package:analyzer/src/context/cache.dart'; | 34 import 'package:analyzer/src/context/cache.dart'; |
| 35 import 'package:analyzer/src/context/context.dart' show AnalysisContextImpl; | 35 import 'package:analyzer/src/context/context.dart' show AnalysisContextImpl; |
| 36 import 'package:analyzer/src/context/source.dart'; |
| 36 import 'package:analyzer/src/generated/ast.dart'; | 37 import 'package:analyzer/src/generated/ast.dart'; |
| 37 import 'package:analyzer/src/generated/engine.dart'; | 38 import 'package:analyzer/src/generated/engine.dart'; |
| 38 import 'package:analyzer/src/generated/error.dart'; | 39 import 'package:analyzer/src/generated/error.dart'; |
| 39 import 'package:analyzer/src/generated/java_engine.dart'; | 40 import 'package:analyzer/src/generated/java_engine.dart'; |
| 40 import 'package:analyzer/src/generated/resolver.dart'; | 41 import 'package:analyzer/src/generated/resolver.dart'; |
| 41 import 'package:analyzer/src/generated/source.dart'; | 42 import 'package:analyzer/src/generated/source.dart'; |
| 42 import 'package:analyzer/src/generated/utilities_collection.dart'; | 43 import 'package:analyzer/src/generated/utilities_collection.dart'; |
| 43 import 'package:analyzer/src/generated/utilities_general.dart'; | 44 import 'package:analyzer/src/generated/utilities_general.dart'; |
| 44 import 'package:analyzer/src/services/lint.dart'; | 45 import 'package:analyzer/src/services/lint.dart'; |
| 45 import 'package:analyzer/src/task/dart.dart'; | 46 import 'package:analyzer/src/task/dart.dart'; |
| (...skipping 1300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1346 buffer.write(lint.runtimeType); | 1347 buffer.write(lint.runtimeType); |
| 1347 buffer.write('</p>'); | 1348 buffer.write('</p>'); |
| 1348 } | 1349 } |
| 1349 } | 1350 } |
| 1350 | 1351 |
| 1351 List<ErrorProcessor> errorProcessors = | 1352 List<ErrorProcessor> errorProcessors = |
| 1352 context.getConfigurationData(CONFIGURED_ERROR_PROCESSORS); | 1353 context.getConfigurationData(CONFIGURED_ERROR_PROCESSORS); |
| 1353 int processorCount = errorProcessors?.length ?? 0; | 1354 int processorCount = errorProcessors?.length ?? 0; |
| 1354 buffer.write('<p><b>Error Processor count</b>: $processorCount</p>'); | 1355 buffer.write('<p><b>Error Processor count</b>: $processorCount</p>'); |
| 1355 }); | 1356 }); |
| 1357 |
| 1358 SourceFactory sourceFactory = context.sourceFactory; |
| 1359 if (sourceFactory is SourceFactoryImpl) { |
| 1360 buffer.write('<h3>Resolvers</h3>'); |
| 1361 for (UriResolver resolver in sourceFactory.resolvers) { |
| 1362 buffer.write('<p>'); |
| 1363 buffer.write(resolver.runtimeType); |
| 1364 buffer.write('</p>'); |
| 1365 } |
| 1366 } |
| 1356 | 1367 |
| 1357 _writeFiles( | 1368 _writeFiles( |
| 1358 buffer, 'Priority Files (${priorityNames.length})', priorityNames); | 1369 buffer, 'Priority Files (${priorityNames.length})', priorityNames); |
| 1359 _writeFiles( | 1370 _writeFiles( |
| 1360 buffer, | 1371 buffer, |
| 1361 'Explicitly Analyzed Files (${explicitNames.length})', | 1372 'Explicitly Analyzed Files (${explicitNames.length})', |
| 1362 explicitNames); | 1373 explicitNames); |
| 1363 _writeFiles( | 1374 _writeFiles( |
| 1364 buffer, | 1375 buffer, |
| 1365 'Implicitly Analyzed Files (${implicitNames.length})', | 1376 'Implicitly Analyzed Files (${implicitNames.length})', |
| (...skipping 1106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2472 */ | 2483 */ |
| 2473 static String makeLink( | 2484 static String makeLink( |
| 2474 String path, Map<String, String> params, String innerHtml, | 2485 String path, Map<String, String> params, String innerHtml, |
| 2475 [bool hasError = false]) { | 2486 [bool hasError = false]) { |
| 2476 Uri uri = new Uri(path: path, queryParameters: params); | 2487 Uri uri = new Uri(path: path, queryParameters: params); |
| 2477 String href = HTML_ESCAPE.convert(uri.toString()); | 2488 String href = HTML_ESCAPE.convert(uri.toString()); |
| 2478 String classAttribute = hasError ? ' class="error"' : ''; | 2489 String classAttribute = hasError ? ' class="error"' : ''; |
| 2479 return '<a href="$href"$classAttribute>$innerHtml</a>'; | 2490 return '<a href="$href"$classAttribute>$innerHtml</a>'; |
| 2480 } | 2491 } |
| 2481 } | 2492 } |
| OLD | NEW |