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

Side by Side Diff: pkg/analysis_server/lib/src/services/dependencies/reachable_source_collector.dart

Issue 2894883002: Remove more libraries directives from server (Closed)
Patch Set: Created 3 years, 7 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
OLDNEW
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.reachable_source_collector;
6
7 import 'dart:collection'; 5 import 'dart:collection';
8 6
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/task/dart.dart'; 9 import 'package:analyzer/task/dart.dart';
12 10
13 /// Collects reachable sources. 11 /// Collects reachable sources.
14 class ReachableSourceCollector { 12 class ReachableSourceCollector {
15 final Map<String, List<String>> _sourceMap = 13 final Map<String, List<String>> _sourceMap =
16 new HashMap<String, List<String>>(); 14 new HashMap<String, List<String>>();
(...skipping 26 matching lines...) Expand all
43 List<Source> sources = <Source>[]; 41 List<Source> sources = <Source>[];
44 sources.addAll(context.computeResult(source, IMPORTED_LIBRARIES)); 42 sources.addAll(context.computeResult(source, IMPORTED_LIBRARIES));
45 sources.addAll(context.computeResult(source, EXPORTED_LIBRARIES)); 43 sources.addAll(context.computeResult(source, EXPORTED_LIBRARIES));
46 44
47 _sourceMap[sourceUri] = 45 _sourceMap[sourceUri] =
48 sources.map((source) => source.uri.toString()).toList(); 46 sources.map((source) => source.uri.toString()).toList();
49 47
50 sources.forEach((s) => _addDependencies(s)); 48 sources.forEach((s) => _addDependencies(s));
51 } 49 }
52 } 50 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698