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

Side by Side Diff: pkg/dartdoc/lib/dartdoc.dart

Issue 11013016: Dartdoc should sort constructors by constructorName, not by class name (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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 | « no previous file | 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 * To generate docs for a library, run this script with the path to an 6 * To generate docs for a library, run this script with the path to an
7 * entrypoint .dart file, like: 7 * entrypoint .dart file, like:
8 * 8 *
9 * $ dart dartdoc.dart foo.dart 9 * $ dart dartdoc.dart foo.dart
10 * 10 *
(...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after
977 void docConstructors(InterfaceMirror type) { 977 void docConstructors(InterfaceMirror type) {
978 final constructors = <MethodMirror>[]; 978 final constructors = <MethodMirror>[];
979 for (var constructor in type.constructors.getValues()) { 979 for (var constructor in type.constructors.getValues()) {
980 if (!constructor.isPrivate) { 980 if (!constructor.isPrivate) {
981 constructors.add(constructor); 981 constructors.add(constructor);
982 } 982 }
983 } 983 }
984 984
985 if (constructors.length > 0) { 985 if (constructors.length > 0) {
986 writeln('<h3>Constructors</h3>'); 986 writeln('<h3>Constructors</h3>');
987 constructors.sort((x, y) => x.simpleName.toUpperCase().compareTo( 987 constructors.sort((x, y) => x.constructorName.toUpperCase().compareTo(
988 y.simpleName.toUpperCase())); 988 y.constructorName.toUpperCase()));
989 989
990 for (final constructor in constructors) { 990 for (final constructor in constructors) {
991 docMethod(type, constructor); 991 docMethod(type, constructor);
992 } 992 }
993 } 993 }
994 } 994 }
995 995
996 void docMembers(ObjectMirror host) { 996 void docMembers(ObjectMirror host) {
997 // Collect the different kinds of members. 997 // Collect the different kinds of members.
998 final staticMethods = []; 998 final staticMethods = [];
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
1575 1575
1576 /** 1576 /**
1577 * Used to report an unexpected error in the DartDoc tool or the 1577 * Used to report an unexpected error in the DartDoc tool or the
1578 * underlying data 1578 * underlying data
1579 */ 1579 */
1580 class InternalError { 1580 class InternalError {
1581 final String message; 1581 final String message;
1582 const InternalError(this.message); 1582 const InternalError(this.message);
1583 String toString() => "InternalError: '$message'"; 1583 String toString() => "InternalError: '$message'";
1584 } 1584 }
OLDNEW
« 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