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

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

Issue 10825054: fix support for --package-root command line option to analyzer dartbug.com/4225 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 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/DefaultCompilerConfiguration.java
===================================================================
--- compiler/java/com/google/dart/compiler/DefaultCompilerConfiguration.java (revision 9979)
+++ compiler/java/com/google/dart/compiler/DefaultCompilerConfiguration.java (working copy)
@@ -14,6 +14,7 @@
import java.net.URI;
import java.net.URISyntaxException;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;
/**
@@ -27,6 +28,7 @@
private final SystemLibraryManager systemLibraryManager;
+
/**
* A default configuration.
*/
@@ -50,6 +52,7 @@
this.compilerOptions = compilerOptions;
this.compilerMetrics = compilerOptions.showMetrics() ? new CompilerMetrics() : null;
this.systemLibraryManager = libraryManager;
+ systemLibraryManager.setPackageRoots(Arrays.asList(new File[]{compilerOptions.getPackageRoot()}));
}
@Override
@@ -123,7 +126,7 @@
return new UrlLibrarySource(systemUri, this.systemLibraryManager);
}
-
+
@Override
public CompilerOptions getCompilerOptions() {
return compilerOptions;
@@ -133,4 +136,9 @@
public ErrorFormat printErrorFormat() {
return compilerOptions.printErrorFormat();
}
+
+ @Override
+ public SystemLibraryManager getSystemLibraryManager() {
+ return systemLibraryManager;
+ }
}

Powered by Google App Engine
This is Rietveld 408576698