Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Unified Diff: pkg/analysis_server/lib/src/status/get_handler2.dart

Issue 2913493002: Add the analysis options path to the diagnostics page. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/context/builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/status/get_handler2.dart
diff --git a/pkg/analysis_server/lib/src/status/get_handler2.dart b/pkg/analysis_server/lib/src/status/get_handler2.dart
index 7d9b785c88fabc32816981c44fd002c0c23ae6aa..2ecd83b9b2717387881236d3d1f9cf43b8836382 100644
--- a/pkg/analysis_server/lib/src/status/get_handler2.dart
+++ b/pkg/analysis_server/lib/src/status/get_handler2.dart
@@ -7,7 +7,8 @@ import 'dart:io';
import 'dart:math';
import 'package:analysis_server/protocol/protocol.dart';
-import 'package:analysis_server/protocol/protocol_generated.dart';
+import 'package:analysis_server/protocol/protocol_generated.dart'
+ hide AnalysisOptions;
import 'package:analysis_server/src/analysis_server.dart';
import 'package:analysis_server/src/domain_completion.dart';
import 'package:analysis_server/src/domain_diagnostic.dart';
@@ -470,10 +471,12 @@ class GetHandler2 implements AbstractGetHandler {
(StringBuffer buffer) {
buffer.write('<h3>Configuration</h3>');
+ AnalysisOptions analysisOptions = driver.analysisOptions;
+
_writeColumns(buffer, <HtmlGenerator>[
(StringBuffer buffer) {
buffer.write('<p><b>Context Options</b></p>');
- writeOptions(buffer, driver.analysisOptions);
+ writeOptions(buffer, analysisOptions);
},
(StringBuffer buffer) {
buffer.write('<p><b>SDK Context Options</b></p>');
@@ -486,7 +489,7 @@ class GetHandler2 implements AbstractGetHandler {
});
},
(StringBuffer buffer) {
- List<Linter> lints = driver.analysisOptions.lintRules;
+ List<Linter> lints = analysisOptions.lintRules;
buffer.write('<p><b>Lints</b></p>');
if (lints.isEmpty) {
buffer.write('<p>none</p>');
@@ -499,13 +502,24 @@ class GetHandler2 implements AbstractGetHandler {
}
List<ErrorProcessor> errorProcessors =
- driver.analysisOptions.errorProcessors;
+ analysisOptions.errorProcessors;
int processorCount = errorProcessors?.length ?? 0;
buffer
.write('<p><b>Error Processor count</b>: $processorCount</p>');
}
]);
+ _writeColumns(buffer, <HtmlGenerator>[
+ (StringBuffer buffer) {
+ buffer.write('<p><b>analysis_options path</b></p>');
+
+ if (analysisOptions.optionsFilePath != null) {
+ buffer.write(
+ '<p>${HTML_ESCAPE.convert(analysisOptions.optionsFilePath)}</p>');
+ }
Paul Berry 2017/05/28 04:19:15 Add an else block that writes '<p>none</p>', lke w
devoncarew 2017/05/30 20:23:32 Done.
+ }
+ ]);
+
SourceFactory sourceFactory = driver.sourceFactory;
if (sourceFactory is SourceFactoryImpl) {
buffer.write('<h3>Resolvers</h3>');
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/context/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698