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

Unified Diff: utils/pub/directory_tree.dart

Issue 12473003: Remove deprecated StringBuffer.add, addAll and addCharCode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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: utils/pub/directory_tree.dart
diff --git a/utils/pub/directory_tree.dart b/utils/pub/directory_tree.dart
index 3610e72deadfad1785c2c9a241a6bc994b3d9af5..882965590b90e1f1ccfc03f10113b22809b1280a 100644
--- a/utils/pub/directory_tree.dart
+++ b/utils/pub/directory_tree.dart
@@ -75,18 +75,17 @@ String generateTree(List<String> files) {
void _drawLine(StringBuffer buffer, String prefix, bool isLastChild,
String name) {
// Print lines.
- buffer.add(prefix);
+ buffer.write(prefix);
if (name != null) {
if (isLastChild) {
- buffer.add("'-- ");
+ buffer.write("'-- ");
} else {
- buffer.add("|-- ");
+ buffer.write("|-- ");
}
}
// Print name.
- buffer.add(name);
- buffer.add('\n');
+ buffer.writeln(name);
}
String _getPrefix(bool isRoot, bool isLast) {
@@ -121,9 +120,9 @@ void _draw(StringBuffer buffer, String prefix, bool isLast,
_drawChild(false, childNames[2]);
// Elide the middle ones.
- buffer.add(prefix);
- buffer.add(_getPrefix(name == null, isLast));
- buffer.add('| (${childNames.length - 6} more...)\n');
+ buffer.write(prefix);
+ buffer.write(_getPrefix(name == null, isLast));
+ buffer.writeln('| (${childNames.length - 6} more...)');
// Show the last few.
_drawChild(false, childNames[childNames.length - 3]);

Powered by Google App Engine
This is Rietveld 408576698