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

Side by Side Diff: tools/dom/docs/lib/docs.dart

Issue 18182010: Make html metadata follow the spec. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed DocsEditable, Experimental, Unstable Created 7 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
« no previous file with comments | « sdk/lib/web_sql/dartium/web_sql_dartium.dart ('k') | tools/dom/scripts/dartmetadata.py » ('j') | 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 * A library for extracting the documentation from the various HTML libraries 6 * A library for extracting the documentation from the various HTML libraries
7 * ([dart:html], [dart:svg], [dart:web_audio], [dart:indexed_db]) and saving 7 * ([dart:html], [dart:svg], [dart:web_audio], [dart:indexed_db]) and saving
8 * those documentation comments to a JSON file. 8 * those documentation comments to a JSON file.
9 */ 9 */
10 10
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 convertedJson.putIfAbsent(libMirror.simpleName, () => 138 convertedJson.putIfAbsent(libMirror.simpleName, () =>
139 libraryJson); 139 libraryJson);
140 } 140 }
141 } 141 }
142 142
143 return convertedJson; 143 return convertedJson;
144 } 144 }
145 145
146 /// Filter out mirrors that are private, or which are not part of this docs 146 /// Filter out mirrors that are private, or which are not part of this docs
147 /// process. That is, ones without the DocsEditable annotation. 147 /// process. That is, ones without the DocsEditable annotation.
148 /// If [ignoreDocsEditable] is true, relax the restriction on @DocsEditable. 148 /// If [ignoreDocsEditable] is true, relax the restriction on @DocsEditable().
149 /// This is to account for classes that are defined in a template, but whose 149 /// This is to account for classes that are defined in a template, but whose
150 /// members are generated. 150 /// members are generated.
151 List<DeclarationMirror> _sortAndFilterMirrors(List<DeclarationMirror> mirrors, 151 List<DeclarationMirror> _sortAndFilterMirrors(List<DeclarationMirror> mirrors,
152 {ignoreDocsEditable: false}) { 152 {ignoreDocsEditable: false}) {
153 153
154 var filteredMirrors = mirrors.where((DeclarationMirror c) => 154 var filteredMirrors = mirrors.where((DeclarationMirror c) =>
155 !domNames(c).isEmpty && 155 !domNames(c).isEmpty &&
156 !displayName(c).startsWith('_') && 156 !displayName(c).startsWith('_') &&
157 (!ignoreDocsEditable ? (findMetadata(c.metadata, 'DocsEditable') != null) 157 (!ignoreDocsEditable ? (findMetadata(c.metadata, 'DocsEditable') != null)
158 : true)) 158 : true))
(...skipping 26 matching lines...) Expand all
185 for (var s in tags.reflectee.split(',')) { 185 for (var s in tags.reflectee.split(',')) {
186 domNames.add(s.trim()); 186 domNames.add(s.trim());
187 } 187 }
188 188
189 if (domNames.length == 1 && domNames[0] == 'none') return <String>[]; 189 if (domNames.length == 1 && domNames[0] == 'none') return <String>[];
190 return domNames; 190 return domNames;
191 } else { 191 } else {
192 return <String>[]; 192 return <String>[];
193 } 193 }
194 } 194 }
OLDNEW
« no previous file with comments | « sdk/lib/web_sql/dartium/web_sql_dartium.dart ('k') | tools/dom/scripts/dartmetadata.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698