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

Unified Diff: pkg/docgen/lib/docgen.dart

Issue 60323008: Revert change to docgen. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/docgen/lib/docgen.dart
diff --git a/pkg/docgen/lib/docgen.dart b/pkg/docgen/lib/docgen.dart
index 701838266be9642c85573ecec32457fa976b4451..20a38d9e73d5e8cb4fc39d99019ea33a9e39dc93 100644
--- a/pkg/docgen/lib/docgen.dart
+++ b/pkg/docgen/lib/docgen.dart
@@ -365,23 +365,12 @@ void _documentLibraries(List<LibraryMirror> libs, {bool includeSdk: false,
_writeToFile(JSON.encode(index), 'index.json');
}
-_filterMap(map, predicate) {
- var result = new Map();
- map.forEach((key, value) {
- if (predicate(value)) result[key] = value;
- });
- return result;
-}
-
Library generateLibrary(dart2js.Dart2JsLibraryMirror library) {
_currentLibrary = library;
- var result = new Library(
- docName(library),
- _commentToHtml(library),
- _variables(_filterMap(library.declarations, (d) => d is VariableMirror)),
- _methods(_filterMap(library.declarations, (d) => d is MethodMirror)),
- _classes(_filterMap(library.declarations, (d) => d is ClassMirror)),
- _isHidden(library));
+ var result = new Library(docName(library), _commentToHtml(library),
+ _variables(library.variables),
+ _methods(library.functions),
+ _classes(library.classes), _isHidden(library));
_findPackage(result, library);
logger.fine('Generated library for ${result.name}');
return result;
@@ -581,11 +570,8 @@ Class _class(ClassMirror mirror) {
var interfaces =
mirror.superinterfaces.map((interface) => _class(interface));
clazz = new Class(mirror.simpleName, superclass, _commentToHtml(mirror),
- interfaces.toList(),
- _variables(_filterMap(mirror.declarations, (d) => d is VariableMirror)),
- _methods(_filterMap(mirror.declarations,
- (d) => d is MethodMirror && !d.isConstructor)),
- _annotations(mirror), _generics(mirror),
+ interfaces.toList(), _variables(mirror.variables),
+ _methods(mirror.methods), _annotations(mirror), _generics(mirror),
docName(mirror), _isHidden(mirror), docName(mirror.owner),
mirror.isAbstract);
if (superclass != null) clazz.addInherited(superclass);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698