OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library services.dependencies.library; | |
6 | |
7 import 'package:analyzer/dart/element/element.dart'; | 5 import 'package:analyzer/dart/element/element.dart'; |
8 import 'package:analyzer/file_system/file_system.dart'; | 6 import 'package:analyzer/file_system/file_system.dart'; |
9 import 'package:analyzer/src/generated/engine.dart'; | 7 import 'package:analyzer/src/generated/engine.dart'; |
10 import 'package:analyzer/src/generated/source.dart'; | 8 import 'package:analyzer/src/generated/source.dart'; |
11 import 'package:analyzer/src/generated/source_io.dart'; | 9 import 'package:analyzer/src/generated/source_io.dart'; |
12 | 10 |
13 class LibraryDependencyCollector { | 11 class LibraryDependencyCollector { |
14 final Set<LibraryElement> _visitedLibraries = new Set<LibraryElement>(); | 12 final Set<LibraryElement> _visitedLibraries = new Set<LibraryElement>(); |
15 final Set<String> _dependencies = new Set<String>(); | 13 final Set<String> _dependencies = new Set<String>(); |
16 | 14 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 } | 58 } |
61 } | 59 } |
62 | 60 |
63 Map<AnalysisContext, Folder> _reverse(Map<Folder, AnalysisContext> map) { | 61 Map<AnalysisContext, Folder> _reverse(Map<Folder, AnalysisContext> map) { |
64 Map<AnalysisContext, Folder> reverseMap = | 62 Map<AnalysisContext, Folder> reverseMap = |
65 new Map<AnalysisContext, Folder>(); | 63 new Map<AnalysisContext, Folder>(); |
66 map.forEach((Folder f, AnalysisContext c) => reverseMap[c] = f); | 64 map.forEach((Folder f, AnalysisContext c) => reverseMap[c] = f); |
67 return reverseMap; | 65 return reverseMap; |
68 } | 66 } |
69 } | 67 } |
OLD | NEW |