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

Side by Side Diff: pkg/analyzer/lib/file_system/memory_file_system.dart

Issue 1180843011: recompute package map when input file changes (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: merge Created 5 years, 6 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 | « pkg/analysis_server/test/context_manager_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 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 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 memory_file_system; 5 library memory_file_system;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 9
10 import 'package:analyzer/src/generated/engine.dart' show TimestampedData; 10 import 'package:analyzer/src/generated/engine.dart' show TimestampedData;
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 _MemoryResource resource = _pathToResource[path]; 157 _MemoryResource resource = _pathToResource[path];
158 if (resource is! _MemoryFolder) { 158 if (resource is! _MemoryFolder) {
159 throw new ArgumentError( 159 throw new ArgumentError(
160 'Folder expected at "$path" but ${resource.runtimeType} found'); 160 'Folder expected at "$path" but ${resource.runtimeType} found');
161 } 161 }
162 } 162 }
163 163
164 void _notifyWatchers(String path, ChangeType changeType) { 164 void _notifyWatchers(String path, ChangeType changeType) {
165 _pathToWatchers.forEach((String watcherPath, 165 _pathToWatchers.forEach((String watcherPath,
166 List<StreamController<WatchEvent>> streamControllers) { 166 List<StreamController<WatchEvent>> streamControllers) {
167 if (posix.isWithin(watcherPath, path)) { 167 if (watcherPath == path || posix.isWithin(watcherPath, path)) {
168 for (StreamController<WatchEvent> streamController 168 for (StreamController<WatchEvent> streamController
169 in streamControllers) { 169 in streamControllers) {
170 streamController.add(new WatchEvent(changeType, path)); 170 streamController.add(new WatchEvent(changeType, path));
171 } 171 }
172 } 172 }
173 }); 173 });
174 } 174 }
175 } 175 }
176 176
177 /** 177 /**
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 bool operator ==(other) { 465 bool operator ==(other) {
466 if (runtimeType != other.runtimeType) { 466 if (runtimeType != other.runtimeType) {
467 return false; 467 return false;
468 } 468 }
469 return path == other.path; 469 return path == other.path;
470 } 470 }
471 471
472 @override 472 @override
473 String toString() => path; 473 String toString() => path;
474 } 474 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/context_manager_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698