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

Unified Diff: pkg/analyzer/lib/src/summary/package_bundle_reader.dart

Issue 2225893003: Provide LINE_INFO from ResynthesizerResultProvider. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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/analysis_server/lib/src/protocol_server.dart ('k') | pkg/analyzer/lib/src/summary/summarize_ast.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/summary/package_bundle_reader.dart
diff --git a/pkg/analyzer/lib/src/summary/package_bundle_reader.dart b/pkg/analyzer/lib/src/summary/package_bundle_reader.dart
index 062ce82466032020f5e85ac5978e60a079f4c9d2..5f34f3dae612f3dfd2765dd2d20995ea3bd4873c 100644
--- a/pkg/analyzer/lib/src/summary/package_bundle_reader.dart
+++ b/pkg/analyzer/lib/src/summary/package_bundle_reader.dart
@@ -15,6 +15,7 @@ import 'package:analyzer/src/summary/resynthesize.dart';
import 'package:analyzer/src/task/dart.dart';
import 'package:analyzer/src/util/fast_uri.dart';
import 'package:analyzer/task/dart.dart';
+import 'package:analyzer/task/general.dart';
import 'package:analyzer/task/model.dart';
import 'package:path/path.dart' as pathos;
@@ -196,6 +197,15 @@ abstract class ResynthesizerResultProvider extends ResultProvider {
return true;
}
return false;
+ } else if (result == LINE_INFO) {
+ UnlinkedUnit unlinkedUnit = _dataStore.unlinkedMap[uriString];
+ List<int> lineStarts = unlinkedUnit.lineStarts;
+ if (lineStarts.isNotEmpty) {
+ LineInfo lineInfo = new LineInfo(lineStarts);
+ entry.setValue(result, lineInfo, TargetedResult.EMPTY_LIST);
+ return true;
+ }
+ return false;
}
} else if (target is LibrarySpecificUnit) {
if (result == CREATED_RESOLVED_UNIT1 ||
« no previous file with comments | « pkg/analysis_server/lib/src/protocol_server.dart ('k') | pkg/analyzer/lib/src/summary/summarize_ast.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698