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

Unified Diff: compiler/java/com/google/dart/compiler/PackageLibraryManager.java

Issue 10986073: Virtual filesystem support for dart_analyzer. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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: compiler/java/com/google/dart/compiler/PackageLibraryManager.java
===================================================================
--- compiler/java/com/google/dart/compiler/PackageLibraryManager.java (revision 12972)
+++ compiler/java/com/google/dart/compiler/PackageLibraryManager.java (working copy)
@@ -87,21 +87,21 @@
}
public PackageLibraryManager(File sdkPath, String platformName) {
- initLibraryManager(sdkPath);
- setPackageRoots(DEFAULT_PACKAGE_ROOTS);
+ this(new FileBasedSystemLibraryProvider(sdkPath));
}
- /**
- * Initialize the SDK system library manager.
- *
- * @param sdkPath the path to the SDK
- */
- protected void initLibraryManager(File sdkPath) {
- if (SDK_LIBRARY_MANAGER == null){
- SDK_LIBRARY_MANAGER = new SystemLibraryManager(sdkPath);
+ public PackageLibraryManager(SystemLibraryProvider libraryProvider) {
+ initLibraryManager(libraryProvider);
+ setPackageRoots(DEFAULT_PACKAGE_ROOTS);
+ }
+
+ protected void initLibraryManager(SystemLibraryProvider libraryProvider) {
+ if (SDK_LIBRARY_MANAGER == null) {
+ SDK_LIBRARY_MANAGER = new SystemLibraryManager(libraryProvider);
}
}
+
/**
* Expand a relative or short URI (e.g. "dart:html") which is implementation independent to its
* full URI (e.g. "dart://html/com/google/dart/htmllib/html.dart").
@@ -329,12 +329,6 @@
public Collection<SystemLibrary> getSystemLibraries(){
return SDK_LIBRARY_MANAGER.getAllSystemLibraries();
- }
+ }
- public File getSdkLibPath() {
- return SDK_LIBRARY_MANAGER.getSdkLibPath();
- }
-
-
-
}

Powered by Google App Engine
This is Rietveld 408576698