| Index: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/model/PackageLibraryManagerProvider.java
|
| ===================================================================
|
| --- editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/model/PackageLibraryManagerProvider.java (revision 12608)
|
| +++ editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/model/PackageLibraryManagerProvider.java (working copy)
|
| @@ -13,6 +13,7 @@
|
| */
|
| package com.google.dart.tools.core.internal.model;
|
|
|
| +import com.google.common.collect.Lists;
|
| import com.google.dart.compiler.PackageLibraryManager;
|
| import com.google.dart.compiler.SystemLibrary;
|
| import com.google.dart.tools.core.DartCore;
|
| @@ -24,6 +25,8 @@
|
| import java.io.File;
|
| import java.net.URI;
|
| import java.util.ArrayList;
|
| +import java.util.Arrays;
|
| +import java.util.Collection;
|
| import java.util.List;
|
|
|
| /**
|
| @@ -35,21 +38,47 @@
|
| private static final class MissingSdkLibaryManager extends PackageLibraryManager {
|
|
|
| private static final SystemLibrary[] NO_LIBRARIES = new SystemLibrary[0];
|
| + private static final Collection<String> NO_SPECS = Lists.newArrayList();
|
|
|
| public MissingSdkLibaryManager(File sdkPath, String platformName) {
|
| super(sdkPath, platformName);
|
| }
|
|
|
| @Override
|
| + public Collection<String> getAllLibrarySpecs() {
|
| + return NO_SPECS;
|
| + }
|
| +
|
| + @Override
|
| + public URI getRelativeUri(URI fileUri) {
|
| + return fileUri;
|
| + }
|
| +
|
| + @Override
|
| + public File getSdkLibPath() {
|
| + return null;
|
| + }
|
| +
|
| + @Override
|
| public URI getShortUri(URI uri) {
|
| return uri;
|
| }
|
|
|
| @Override
|
| + public Collection<SystemLibrary> getSystemLibraries() {
|
| + return Arrays.asList(getDefaultLibraries());
|
| + }
|
| +
|
| + @Override
|
| protected SystemLibrary[] getDefaultLibraries() {
|
| return NO_LIBRARIES;
|
| }
|
|
|
| + @Override
|
| + protected void initLibraryManager(File sdkPath) {
|
| + //do nothing since no SDK means system library
|
| + }
|
| +
|
| }
|
|
|
| private static final Object lock = new Object();
|
|
|