| 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:collection'; | 7 import 'dart:collection'; |
| 8 import 'dart:convert'; | 8 import 'dart:convert'; |
| 9 import 'dart:io'; | 9 import 'dart:io'; |
| 10 import 'dart:math'; | 10 import 'dart:math'; |
| (...skipping 1323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1334 (StringBuffer buffer) { | 1334 (StringBuffer buffer) { |
| 1335 buffer.write('<p><b>Context Options</b></p>'); | 1335 buffer.write('<p><b>Context Options</b></p>'); |
| 1336 writeOptions(buffer, context.analysisOptions); | 1336 writeOptions(buffer, context.analysisOptions); |
| 1337 }, | 1337 }, |
| 1338 (StringBuffer buffer) { | 1338 (StringBuffer buffer) { |
| 1339 buffer.write('<p><b>SDK Context Options</b></p>'); | 1339 buffer.write('<p><b>SDK Context Options</b></p>'); |
| 1340 writeOptions(buffer, | 1340 writeOptions(buffer, |
| 1341 context?.sourceFactory?.dartSdk?.context?.analysisOptions); | 1341 context?.sourceFactory?.dartSdk?.context?.analysisOptions); |
| 1342 }, | 1342 }, |
| 1343 (StringBuffer buffer) { | 1343 (StringBuffer buffer) { |
| 1344 List<Linter> lints = context | 1344 List<Linter> lints = |
| 1345 .getConfigurationData(CONFIGURED_LINTS_KEY) as List<Linter>; | 1345 context.getConfigurationData(CONFIGURED_LINTS_KEY); |
| 1346 buffer.write('<p><b>Lints</b></p>'); | 1346 buffer.write('<p><b>Lints</b></p>'); |
| 1347 if (lints.isEmpty) { | 1347 if (lints.isEmpty) { |
| 1348 buffer.write('<p>none</p>'); | 1348 buffer.write('<p>none</p>'); |
| 1349 } else { | 1349 } else { |
| 1350 for (Linter lint in lints) { | 1350 for (Linter lint in lints) { |
| 1351 buffer.write('<p>'); | 1351 buffer.write('<p>'); |
| 1352 buffer.write(lint.runtimeType); | 1352 buffer.write(lint.runtimeType); |
| 1353 buffer.write('</p>'); | 1353 buffer.write('</p>'); |
| 1354 } | 1354 } |
| 1355 } | 1355 } |
| 1356 | 1356 |
| 1357 List<ErrorProcessor> errorProcessors = | 1357 List<ErrorProcessor> errorProcessors = |
| 1358 context.getConfigurationData(CONFIGURED_ERROR_PROCESSORS) | 1358 context.getConfigurationData(CONFIGURED_ERROR_PROCESSORS); |
| 1359 as List<ErrorProcessor>; | |
| 1360 int processorCount = errorProcessors?.length ?? 0; | 1359 int processorCount = errorProcessors?.length ?? 0; |
| 1361 buffer | 1360 buffer |
| 1362 .write('<p><b>Error Processor count</b>: $processorCount</p>'); | 1361 .write('<p><b>Error Processor count</b>: $processorCount</p>'); |
| 1363 } | 1362 } |
| 1364 ]); | 1363 ]); |
| 1365 | 1364 |
| 1366 SourceFactory sourceFactory = context.sourceFactory; | 1365 SourceFactory sourceFactory = context.sourceFactory; |
| 1367 if (sourceFactory is SourceFactoryImpl) { | 1366 if (sourceFactory is SourceFactoryImpl) { |
| 1368 buffer.write('<h3>Resolvers</h3>'); | 1367 buffer.write('<h3>Resolvers</h3>'); |
| 1369 for (UriResolver resolver in sourceFactory.resolvers) { | 1368 for (UriResolver resolver in sourceFactory.resolvers) { |
| (...skipping 1093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2463 */ | 2462 */ |
| 2464 static String makeLink( | 2463 static String makeLink( |
| 2465 String path, Map<String, String> params, String innerHtml, | 2464 String path, Map<String, String> params, String innerHtml, |
| 2466 [bool hasError = false]) { | 2465 [bool hasError = false]) { |
| 2467 Uri uri = new Uri(path: path, queryParameters: params); | 2466 Uri uri = new Uri(path: path, queryParameters: params); |
| 2468 String href = HTML_ESCAPE.convert(uri.toString()); | 2467 String href = HTML_ESCAPE.convert(uri.toString()); |
| 2469 String classAttribute = hasError ? ' class="error"' : ''; | 2468 String classAttribute = hasError ? ' class="error"' : ''; |
| 2470 return '<a href="$href"$classAttribute>$innerHtml</a>'; | 2469 return '<a href="$href"$classAttribute>$innerHtml</a>'; |
| 2471 } | 2470 } |
| 2472 } | 2471 } |
| OLD | NEW |