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

Side by Side Diff: pkg/analysis_services/lib/src/correction/source_buffer.dart

Issue 418203002: Implement more fixes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
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 // This code was auto-generated, is not intended to be edited, and is subject to 5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information. 6 // significant change. Please see the README file for more information.
7 7
8 library services.src.correction.source_buffer; 8 library services.src.correction.source_buffer;
9 9
10 import 'package:analysis_services/correction/change.dart'; 10 import 'package:analysis_services/correction/change.dart';
(...skipping 17 matching lines...) Expand all
28 28
29 void addProposal(String proposal) { 29 void addProposal(String proposal) {
30 // TODO(scheglov) implement 30 // TODO(scheglov) implement
31 // _currentPositionGroup.addProposal(); 31 // _currentPositionGroup.addProposal();
32 } 32 }
33 33
34 void addProposals(List<String> proposals) { 34 void addProposals(List<String> proposals) {
35 proposals.forEach((proposal) => addProposal(proposal)); 35 proposals.forEach((proposal) => addProposal(proposal));
36 } 36 }
37 37
38 int get length => _buffer.length;
39
38 /** 40 /**
39 * Appends [s] to the buffer. 41 * Appends [s] to the buffer.
40 */ 42 */
41 SourceBuilder append(String s) { 43 SourceBuilder append(String s) {
42 _buffer.write(s); 44 _buffer.write(s);
43 return this; 45 return this;
44 } 46 }
45 47
46 /** 48 /**
47 * Ends position started using [startPosition]. 49 * Ends position started using [startPosition].
(...skipping 28 matching lines...) Expand all
76 /** 78 /**
77 * Adds position location [SourceRange] using current fields. 79 * Adds position location [SourceRange] using current fields.
78 */ 80 */
79 void _addPosition() { 81 void _addPosition() {
80 int start = offset + _currentPositionStart; 82 int start = offset + _currentPositionStart;
81 int end = offset + _buffer.length; 83 int end = offset + _buffer.length;
82 Position position = new Position(file, start, end - start); 84 Position position = new Position(file, start, end - start);
83 _currentLinkedPositionGroup.add(position); 85 _currentLinkedPositionGroup.add(position);
84 } 86 }
85 } 87 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698