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

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

Issue 11361029: List abstract classes separately in Dartdoc (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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/dartdoc/lib/dartdoc.dart
diff --git a/pkg/dartdoc/lib/dartdoc.dart b/pkg/dartdoc/lib/dartdoc.dart
index 755b87f9adc3c681ad25bb6197868fddb70ea96f..6649e0b9543d9b26a8f6d8db2e1b779ad232888f 100644
--- a/pkg/dartdoc/lib/dartdoc.dart
+++ b/pkg/dartdoc/lib/dartdoc.dart
@@ -744,8 +744,9 @@ class Dartdoc {
docMembers(library);
// Document the types.
- final classes = <ClassMirror>[];
final interfaces = <ClassMirror>[];
+ final abstractClasses = <ClassMirror>[];
+ final classes = <ClassMirror>[];
final typedefs = <TypedefMirror>[];
final exceptions = <ClassMirror>[];
@@ -755,7 +756,11 @@ class Dartdoc {
if (isException(type)) {
exceptions.add(type);
} else if (type.isClass) {
- classes.add(type);
+ if (type.isAbstract) {
+ abstractClasses.add(type);
+ } else {
+ classes.add(type);
+ }
} else if (type.isInterface){
interfaces.add(type);
} else if (type is TypedefMirror) {
@@ -765,8 +770,9 @@ class Dartdoc {
}
}
- docTypes(classes, 'Classes');
docTypes(interfaces, 'Interfaces');
+ docTypes(abstractClasses, 'Abstract Classes');
+ docTypes(classes, 'Classes');
docTypes(typedefs, 'Typedefs');
docTypes(exceptions, 'Exceptions');
@@ -1833,7 +1839,8 @@ class Dartdoc {
* Returns [:true:] if [type] should be regarded as an exception.
*/
bool isException(TypeMirror type) {
- return type.simpleName.endsWith('Exception');
+ return type.simpleName.endsWith('Exception') ||
+ type.simpleName.endsWith('Error');
}
}
« 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