| Index: pkg/analyzer/lib/source/pub_package_map_provider.dart
|
| diff --git a/pkg/analyzer/lib/source/package_map_provider.dart b/pkg/analyzer/lib/source/pub_package_map_provider.dart
|
| similarity index 79%
|
| copy from pkg/analyzer/lib/source/package_map_provider.dart
|
| copy to pkg/analyzer/lib/source/pub_package_map_provider.dart
|
| index 9d738152365995977ac913a511fab73d591ad301..cb949eaf1b9b4fdad78338e203c0bda3db7c7080 100644
|
| --- a/pkg/analyzer/lib/source/package_map_provider.dart
|
| +++ b/pkg/analyzer/lib/source/pub_package_map_provider.dart
|
| @@ -2,55 +2,19 @@
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| -library source.package_map_provider;
|
| +library source.pub_package_map_provider;
|
|
|
| import 'dart:collection';
|
| import 'dart:convert';
|
| import 'dart:io' as io;
|
|
|
| import 'package:analyzer/file_system/file_system.dart';
|
| +import 'package:analyzer/source/package_map_provider.dart';
|
| import 'package:analyzer/src/generated/engine.dart';
|
| import 'package:analyzer/src/generated/sdk_io.dart';
|
| import 'package:path/path.dart';
|
|
|
| /**
|
| - * Data structure output by PackageMapProvider. This contains both the package
|
| - * map and dependency information.
|
| - */
|
| -class PackageMapInfo {
|
| - /**
|
| - * The package map itself. This is a map from package name to a list of
|
| - * the folders containing source code for the package.
|
| - *
|
| - * `null` if an error occurred.
|
| - */
|
| - Map<String, List<Folder>> packageMap;
|
| -
|
| - /**
|
| - * Dependency information. This is a set of the paths which were consulted
|
| - * in order to generate the package map. If any of these files is
|
| - * modified, the package map will need to be regenerated.
|
| - */
|
| - Set<String> dependencies;
|
| -
|
| - PackageMapInfo(this.packageMap, this.dependencies);
|
| -}
|
| -
|
| -/**
|
| - * A PackageMapProvider is an entity capable of determining the mapping from
|
| - * package name to source directory for a given folder.
|
| - */
|
| -abstract class PackageMapProvider {
|
| - /**
|
| - * Compute a package map for the given folder, if possible.
|
| - *
|
| - * If a package map can't be computed (e.g. because an error occurred), a
|
| - * [PackageMapInfo] will still be returned, but its packageMap will be null.
|
| - */
|
| - PackageMapInfo computePackageMap(Folder folder);
|
| -}
|
| -
|
| -/**
|
| * Implementation of PackageMapProvider that operates by executing pub.
|
| */
|
| class PubPackageMapProvider implements PackageMapProvider {
|
|
|