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

Unified Diff: pkg/analysis_server/lib/src/services/correction/assist_internal.dart

Issue 574573002: Add SourceFileEdit.time field. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: tweak Created 6 years, 3 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/analysis_server/lib/src/services/correction/assist_internal.dart
diff --git a/pkg/analysis_server/lib/src/services/correction/assist_internal.dart b/pkg/analysis_server/lib/src/services/correction/assist_internal.dart
index 9cc5675cb7681f727b50d30b3cb7d7f47eab0b32..b9ef38e7236ac6b2da9ff3077b38caba4243e2b9 100644
--- a/pkg/analysis_server/lib/src/services/correction/assist_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/assist_internal.dart
@@ -34,6 +34,7 @@ class AssistProcessor {
final SearchEngine searchEngine;
final Source source;
final String file;
+ int fileStamp;
final CompilationUnit unit;
final int selectionOffset;
final int selectionLength;
@@ -58,6 +59,7 @@ class AssistProcessor {
unitLibraryElement = unitElement.library;
unitLibraryFile = unitLibraryElement.source.fullName;
unitLibraryFolder = dirname(unitLibraryFile);
+ fileStamp = unitElement.context.getModificationStamp(source);
selectionEnd = selectionOffset + selectionLength;
}
@@ -131,7 +133,7 @@ class AssistProcessor {
return;
}
// prepare file edit
- SourceFileEdit fileEdit = new SourceFileEdit(file);
+ SourceFileEdit fileEdit = new SourceFileEdit(file, fileStamp);
fileEdit.addAll(edits);
// prepare Change
String message = formatList(kind.message, args);
« no previous file with comments | « pkg/analysis_server/lib/src/protocol.dart ('k') | pkg/analysis_server/lib/src/services/correction/fix_internal.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698