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

Unified Diff: pkg/analyzer/lib/file_system/memory_file_system.dart

Issue 958373003: Don't remove indexing operations on potential source changes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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
Index: pkg/analyzer/lib/file_system/memory_file_system.dart
diff --git a/pkg/analyzer/lib/file_system/memory_file_system.dart b/pkg/analyzer/lib/file_system/memory_file_system.dart
index daba7f59e0151272044102f2af1baf2dc7e31547..9264f68922a663c188b425fb0206b9e5dc572b71 100644
--- a/pkg/analyzer/lib/file_system/memory_file_system.dart
+++ b/pkg/analyzer/lib/file_system/memory_file_system.dart
@@ -111,6 +111,17 @@ class MemoryResourceProvider implements ResourceProvider {
return file;
}
+ File updateFile(String path, String content, [int stamp]) {
+ path = posix.normalize(path);
+ newFolder(posix.dirname(path));
+ _MemoryFile file = new _MemoryFile(this, path);
+ _pathToResource[path] = file;
+ _pathToContent[path] = content;
+ _pathToTimestamp[path] = stamp != null ? stamp : nextStamp++;
+ _notifyWatchers(path, ChangeType.MODIFY);
+ return file;
+ }
+
Folder newFolder(String path) {
path = posix.normalize(path);
if (!path.startsWith('/')) {

Powered by Google App Engine
This is Rietveld 408576698