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

Unified Diff: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/analysis/Library.java

Issue 10174004: Update AnalysisServer to preserve DartC import prefixes (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 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: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/analysis/Library.java
===================================================================
--- editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/analysis/Library.java (revision 6826)
+++ editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/analysis/Library.java (working copy)
@@ -26,6 +26,7 @@
import java.net.URI;
import java.util.Collection;
import java.util.HashMap;
+import java.util.Set;
/**
* Cached information about a Dart library used internally by the {@link AnalysisServer}.
@@ -36,7 +37,7 @@
* Construct a new library from the unresolved dart unit that defines the library
*/
static Library fromDartUnit(AnalysisServer server, File libFile, LibrarySource libSource,
- DartUnit dartUnit) {
+ DartUnit dartUnit, Set<String> prefixes) {
HashMap<String, File> imports = new HashMap<String, File>();
HashMap<String, File> sources = new HashMap<String, File>();
URI base = libFile.toURI();
@@ -75,12 +76,13 @@
}
}
- Library library = new Library(libFile, libSource, dartUnit, imports, sources);
+ Library library = new Library(libFile, libSource, dartUnit, prefixes, imports, sources);
return library;
}
private final File libraryFile;
private final LibrarySource librarySource;
+ private final Set<String> prefixes;
private final HashMap<String, File> imports;
private final HashMap<String, File> sources;
private final HashMap<File, DartUnit> unitCache;
@@ -88,9 +90,10 @@
private LibraryUnit libraryUnit;
private Library(File libraryFile, LibrarySource librarySource, DartUnit libraryUnit,
- HashMap<String, File> imports, HashMap<String, File> sources) {
+ Set<String> prefixes, HashMap<String, File> imports, HashMap<String, File> sources) {
this.libraryFile = libraryFile;
this.librarySource = librarySource;
+ this.prefixes = prefixes;
this.imports = imports;
this.sources = sources;
this.unitCache = new HashMap<File, DartUnit>();
@@ -135,6 +138,10 @@
return libraryUnit;
}
+ Set<String> getPrefixes() {
+ return prefixes;
+ }
+
Collection<File> getSourceFiles() {
return sources.values();
}

Powered by Google App Engine
This is Rietveld 408576698