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

Unified Diff: pkg/analyzer/lib/src/task/dart_work_manager.dart

Issue 1138853003: Create ChangeNotice(s) and set parsed/resolved units. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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 | « pkg/analyzer/lib/src/generated/engine.dart ('k') | pkg/analyzer/test/generated/engine_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/task/dart_work_manager.dart
diff --git a/pkg/analyzer/lib/src/task/dart_work_manager.dart b/pkg/analyzer/lib/src/task/dart_work_manager.dart
index 500422fe09f0df74264306d922c395e6de230bc8..d67898a8811dda6f8fbe9f72e3b628929114ae7d 100644
--- a/pkg/analyzer/lib/src/task/dart_work_manager.dart
+++ b/pkg/analyzer/lib/src/task/dart_work_manager.dart
@@ -7,6 +7,7 @@ library analyzer.src.task.dart_work_manager;
import 'dart:collection';
import 'package:analyzer/src/context/cache.dart';
+import 'package:analyzer/src/generated/ast.dart' show CompilationUnit;
import 'package:analyzer/src/generated/engine.dart'
show AnalysisEngine, CacheState, InternalAnalysisContext;
import 'package:analyzer/src/generated/source.dart';
@@ -177,6 +178,21 @@ class DartWorkManager implements WorkManager {
}
}
}
+ // Update notice.
+ if (_isDartSource(target)) {
+ CompilationUnit unit = outputs[PARSED_UNIT];
+ if (unit != null) {
+ context.getNotice(target).parsedDartUnit = unit;
+ }
+ }
+ if (target is LibrarySpecificUnit) {
+ CompilationUnit unit = outputs[RESOLVED_UNIT];
+ if (unit != null) {
+ context.getNotice(target.source).resolvedDartUnit = unit;
+ }
+ }
+ // TODO(scheglov) Move getError() implementation into DWM.
+ // Set errors into notice on any error result change.
}
bool _isDartSource(AnalysisTarget target) {
« no previous file with comments | « pkg/analyzer/lib/src/generated/engine.dart ('k') | pkg/analyzer/test/generated/engine_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698