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

Unified Diff: pkg/analyzer/lib/source/pub_package_map_provider.dart

Issue 599133002: Move PubPackageMapProvider to its own file. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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
« no previous file with comments | « pkg/analyzer/lib/source/package_map_provider.dart ('k') | pkg/analyzer/lib/src/analyzer_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 {
« no previous file with comments | « pkg/analyzer/lib/source/package_map_provider.dart ('k') | pkg/analyzer/lib/src/analyzer_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698