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

Side by Side Diff: analyzer/lib/source/package_map_provider.dart

Issue 1400473008: Roll Observatory packages and add a roll script (Closed) Base URL: git@github.com:dart-lang/observatory_pub_packages.git@master
Patch Set: Created 5 years, 2 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 unified diff | Download patch
« no previous file with comments | « analyzer/lib/plugin/task.dart ('k') | analyzer/lib/source/package_map_resolver.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 library source.package_map_provider;
6
7 import 'package:analyzer/file_system/file_system.dart';
8
9 /**
10 * Data structure output by PackageMapProvider. This contains both the package
11 * map and dependency information.
12 */
13 class PackageMapInfo {
14 /**
15 * The package map itself. This is a map from package name to a list of
16 * the folders containing source code for the package.
17 *
18 * `null` if an error occurred.
19 */
20 Map<String, List<Folder>> packageMap;
21
22 /**
23 * Dependency information. This is a set of the paths which were consulted
24 * in order to generate the package map. If any of these files is
25 * modified, the package map will need to be regenerated.
26 */
27 Set<String> dependencies;
28
29 PackageMapInfo(this.packageMap, this.dependencies);
30 }
31
32 /**
33 * A PackageMapProvider is an entity capable of determining the mapping from
34 * package name to source directory for a given folder.
35 */
36 abstract class PackageMapProvider {
37 /**
38 * Compute a package map for the given folder, if possible.
39 *
40 * If a package map can't be computed (e.g. because an error occurred), a
41 * [PackageMapInfo] will still be returned, but its packageMap will be null.
42 */
43 PackageMapInfo computePackageMap(Folder folder);
44 }
OLDNEW
« no previous file with comments | « analyzer/lib/plugin/task.dart ('k') | analyzer/lib/source/package_map_resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698