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

Unified Diff: pkg/analyzer/lib/src/generated/testing/element_factory.dart

Issue 1125123006: Add a "librarySource" field to CompilationUnitElementImpl. (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/resolver.dart ('k') | pkg/analyzer/lib/src/task/dart.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/testing/element_factory.dart
diff --git a/pkg/analyzer/lib/src/generated/testing/element_factory.dart b/pkg/analyzer/lib/src/generated/testing/element_factory.dart
index 497990c91cd366320bc04c0cd58673c8aa18c400..a8d7fff3a88c58133e60222e7f47791610e5bb5a 100644
--- a/pkg/analyzer/lib/src/generated/testing/element_factory.dart
+++ b/pkg/analyzer/lib/src/generated/testing/element_factory.dart
@@ -82,10 +82,15 @@ class ElementFactory {
[List<String> parameterNames]) =>
classTypeAlias(typeName, objectType, parameterNames);
- static CompilationUnitElementImpl compilationUnit(String fileName) {
+ static CompilationUnitElementImpl compilationUnit(String fileName,
+ [Source librarySource]) {
Source source = new NonExistingSource(fileName, UriKind.FILE_URI);
CompilationUnitElementImpl unit = new CompilationUnitElementImpl(fileName);
unit.source = source;
+ if (librarySource == null) {
+ librarySource = source;
+ }
+ unit.librarySource = librarySource;
return unit;
}
« no previous file with comments | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | pkg/analyzer/lib/src/task/dart.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698