anchor.diff:      var partUri = new Uri.file(pathos.join(directory, partPath));
       assert(partUri.isAbsolute);
       JavaFile javaFile = new JavaFile.fromUri(partUri);
  -    return new _SdkExtFileBasedSource(javaFile, importUri);
  +    return new FileBasedSource(javaFile, importUri);
     }
   
     /// Resolve an import of an sdk extension.
     Source _resolveEntry(Uri libraryEntry, Uri importUri) {
       // Library entry.
       JavaFile javaFile = new JavaFile.fromUri(libraryEntry);
  -    return new _SdkExtFileBasedSource(javaFile, importUri);
  +    return new FileBasedSource(javaFile, importUri);
  +  }
  +
  +  /// Return the library name of [importUri].
  +  String _libraryName(Uri importUri) {
  +    var uri = importUri.toString();
  +    int index = uri.indexOf('/');
  +    if (index >= 0) {
  +      return uri.substring(0, index);
  +    }
  +    return uri;
  +  }
  +
  +  /// Return the part path of [importUri].
  +  String _partPath(Uri importUri) {
  +    var uri = importUri.toString();
  +    int index = uri.indexOf('/');
  +    if (index >= 0) {
  +      return uri.substring(index + 1);
  +    }
  +    return null;
  +  }
  +
  +  /// Returns true if [libraryName] is a registered sdk extension.
  +  bool _registeredSdkExtension(String libraryName) {
  +    return _urlMappings[libraryName] != null;
     }
   
     @override
     Source resolveAbsolute(Uri importUri) {
  -    // Split import uri into library name and (optionally) a part path.
  -    var uri = importUri.toString();
  -    String libraryName;
  -    String partPath;
  -    int index = uri.indexOf('/');
  -    if (index >= 0) {
  -      libraryName = uri.substring(0, index);
  -      partPath = uri.substring(index + 1);
  -    } else {
  -      libraryName = uri;
  -    }
  +    String libraryName = _libraryName(importUri);
  +    String partPath = _partPath(importUri);
       // Lookup library name in mappings.
       String mapping = _urlMappings[libraryName];
       if (mapping == null) {
  
positive.code: 
    @override
    Uri restoreAbsolute(Source source) {
      if (source is _SdkExtFileBasedSource) {
        return source.uri;
      }
      return null;
  
negative.code:       return null;
      }
  
      if (partPath != null) {
        return _resolvePart(libraryEntry, partPath, importUri);
      } else {
        return _resolveEntry(libraryEntry, importUri);
  