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

Unified Diff: pkg/analysis_server/lib/src/protocol_server.dart

Issue 1385523002: AnalysisError `hasFix` attr (Implements #23874). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Doc typo fix. Created 5 years, 2 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
Index: pkg/analysis_server/lib/src/protocol_server.dart
diff --git a/pkg/analysis_server/lib/src/protocol_server.dart b/pkg/analysis_server/lib/src/protocol_server.dart
index a9dd5dd9051d59bacb05d5d3339634c1cad7acd4..705b7aae74bd1306249860aa98da01f91fd1d932 100644
--- a/pkg/analysis_server/lib/src/protocol_server.dart
+++ b/pkg/analysis_server/lib/src/protocol_server.dart
@@ -5,6 +5,7 @@
library protocol.server;
import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/src/services/correction/fix.dart';
import 'package:analysis_server/src/services/search/search_engine.dart'
as engine;
import 'package:analyzer/src/generated/ast.dart' as engine;
@@ -92,8 +93,9 @@ AnalysisError newAnalysisError_fromEngine(
var type = new AnalysisErrorType(errorCode.type.name);
String message = error.message;
String correction = error.correction;
+ bool fix = hasFix(error.errorCode);
return new AnalysisError(severity, type, location, message,
- correction: correction);
+ correction: correction, hasFix: fix);
}
/**
« no previous file with comments | « pkg/analysis_server/lib/src/generated_protocol.dart ('k') | pkg/analysis_server/lib/src/services/correction/fix.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698