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

Unified Diff: pkg/analysis_server/tool/spec/codegen_dart_protocol.dart

Issue 574573002: Add SourceFileEdit.time field. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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/tool/spec/codegen_dart_protocol.dart
diff --git a/pkg/analysis_server/tool/spec/codegen_dart_protocol.dart b/pkg/analysis_server/tool/spec/codegen_dart_protocol.dart
index 43fc138473a4f629891144af34f466a087381cc7..57e066d3006dcc49151f8d4c00b79ac4ab25934c 100644
--- a/pkg/analysis_server/tool/spec/codegen_dart_protocol.dart
+++ b/pkg/analysis_server/tool/spec/codegen_dart_protocol.dart
@@ -201,7 +201,7 @@ class CodegenProtocolVisitor extends HierarchicalApiVisitor with CodeGenerator {
static const Map<String, List<String>> _optionalConstructorArguments = const {
'AnalysisErrorFixes': const ['fixes'],
'SourceChange': const ['edits', 'linkedEditGroups'],
- 'SourceFileEdit': const ['edits'],
+ 'SourceFileEdit': const ['time', 'edits'],
'TypeHierarchyItem': const ['interfaces', 'mixins', 'subclasses'],
};
@@ -623,6 +623,15 @@ class CodegenProtocolVisitor extends HierarchicalApiVisitor with CodeGenerator {
writeln('}');
});
}
+ if (className == 'SourceFileEdit' && field.name == 'time') {
+ extraInitCode.add(() {
+ writeln('if (${field.name} == null) {');
+ indent(() {
+ writeln('${field.name} = new DateTime.now().millisecondsSinceEpoch;');
+ });
+ writeln('}');
+ });
+ }
} else {
args.add(arg);
}

Powered by Google App Engine
This is Rietveld 408576698