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

Side by Side Diff: tools/html_json_doc/lib/json_to_html.dart

Issue 11792006: Re-generating generated DOM files. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 /** 5 /**
6 * Library for taking a JSON file and putting the comments located within into 6 * Library for taking a JSON file and putting the comments located within into
7 * the HTML files the comments are associated with. 7 * the HTML files the comments are associated with.
8 * 8 *
9 * The format of the JSON file is: 9 * The format of the JSON file is:
10 * 10 *
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 unusedComments.putIfAbsent(key, () => comments); 133 unusedComments.putIfAbsent(key, () => comments);
134 } 134 }
135 }); 135 });
136 136
137 unusedComments.forEach((String key, _) { 137 unusedComments.forEach((String key, _) {
138 print('WARNING: the following key was found in the JSON but not in ' 138 print('WARNING: the following key was found in the JSON but not in '
139 '${new Path(file.fullPathSync()).filename}:\n"$key"'); 139 '${new Path(file.fullPathSync()).filename}:\n"$key"');
140 _anyErrors = true; 140 _anyErrors = true;
141 }); 141 });
142 142
143 for (var i = 0; i < fileLines.length; ++i) {
144 fileLines[i] = fileLines[i].replaceAll(new RegExp(r'\s+$'), '');
145 }
146
143 // TODO(amouravski): file.writeAsStringSync('${Strings.join(fileLines, '\n')}\ n'); 147 // TODO(amouravski): file.writeAsStringSync('${Strings.join(fileLines, '\n')}\ n');
144 var outputStream = file.openOutputStream(); 148 var outputStream = file.openOutputStream();
145 outputStream.writeString(Strings.join(fileLines, '\n')); 149 outputStream.writeString(Strings.join(fileLines, '\n'));
146 outputStream.writeString('\n'); 150 outputStream.writeString('\n');
147 151
148 outputStream.onNoPendingWrites = () { 152 outputStream.onNoPendingWrites = () {
149 outputStream.close(); 153 outputStream.close();
150 }; 154 };
151 } 155 }
OLDNEW
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698