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

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

Issue 497393002: Make more use of generated code in analysis server. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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/source_buffer.dart
diff --git a/pkg/analysis_server/lib/src/services/correction/source_buffer.dart b/pkg/analysis_server/lib/src/services/correction/source_buffer.dart
index 1fb6f3ca047d48245221f9df4978ce5670c8ff49..a34d89c8d2baad4cbacffe446d9e9cc033d881be 100644
--- a/pkg/analysis_server/lib/src/services/correction/source_buffer.dart
+++ b/pkg/analysis_server/lib/src/services/correction/source_buffer.dart
@@ -4,8 +4,7 @@
library services.src.correction.source_buffer;
-import 'package:analysis_server/src/protocol2.dart' show Position;
-import 'package:analysis_server/src/services/correction/change.dart';
+import 'package:analysis_server/src/protocol2.dart';
import 'package:analyzer/src/generated/source.dart';
@@ -42,7 +41,7 @@ class SourceBuilder {
int get length => _buffer.length;
void addSuggestion(LinkedEditSuggestionKind kind, String value) {
- var suggestion = new LinkedEditSuggestion(kind, value);
+ var suggestion = new LinkedEditSuggestion(value, kind);
_currentLinkedPositionGroup.addSuggestion(suggestion);
}
@@ -81,7 +80,7 @@ class SourceBuilder {
assert(_currentLinkedPositionGroup == null);
_currentLinkedPositionGroup = linkedPositionGroups[id];
if (_currentLinkedPositionGroup == null) {
- _currentLinkedPositionGroup = new LinkedEditGroup();
+ _currentLinkedPositionGroup = new LinkedEditGroup.empty();
linkedPositionGroups[id] = _currentLinkedPositionGroup;
}
_currentPositionStart = _buffer.length;

Powered by Google App Engine
This is Rietveld 408576698