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

Unified Diff: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/model/SystemLibraryManagerProvider.java

Issue 10809023: changes to SystemLibraryManager to support list of roots (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: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/model/SystemLibraryManagerProvider.java
===================================================================
--- editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/model/SystemLibraryManagerProvider.java (revision 9779)
+++ editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/model/SystemLibraryManagerProvider.java (working copy)
@@ -20,10 +20,12 @@
import com.google.dart.tools.core.model.DartSdk;
import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
/**
- * The class <code>SystemLibraryManagerProvider</code> manages the {@link SystemLibraryManager
- * system library managers} used by the tools.
+ * The class <code>SystemLibraryManagerProvider</code> manages the {@link SystemLibraryManager system library managers} used by
+ * the tools.
*/
public class SystemLibraryManagerProvider {
private static final Object lock = new Object();
@@ -51,11 +53,15 @@
DartCore.logInformation("Reading bundled libraries from " + sdkDir);
ANY_LIBRARY_MANAGER = new EditorLibraryManager(sdkDir, "any");
- String packageRoot = DartCore.getPlugin().getPrefs().get(
- DartCore.PACKAGE_ROOT_DIR_PREFERENCE,
- "");
+ String packageRoot = DartCore.getPlugin()
+ .getPrefs().get(DartCore.PACKAGE_ROOT_DIR_PREFERENCE, "");
if (packageRoot != null && !packageRoot.isEmpty()) {
- ANY_LIBRARY_MANAGER.setPackageRoot(new File(packageRoot));
+ String[] roots = packageRoot.split(";");
+ List<File> packageRoots = new ArrayList<File>();
+ for (String path : roots) {
+ packageRoots.add(new File(path));
+ }
+ ANY_LIBRARY_MANAGER.setPackageRoots(packageRoots);
}
}

Powered by Google App Engine
This is Rietveld 408576698