| Index: utils/dartdoc/dartdoc.dart
|
| diff --git a/utils/dartdoc/dartdoc.dart b/utils/dartdoc/dartdoc.dart
|
| index 18b15bdfb2c0f3bc4af0cd150b6f464ba483fcba..e11db2fe208959e354eb896dd5648f324c4c0926 100644
|
| --- a/utils/dartdoc/dartdoc.dart
|
| +++ b/utils/dartdoc/dartdoc.dart
|
| @@ -248,29 +248,39 @@ docNavigation() {
|
|
|
| /** Writes the navigation for the types contained by the given library. */
|
| docLibraryNavigation(Library library) {
|
| - final types = orderByName(library.types).filter(
|
| - (type) => !type.isTop && !type.name.startsWith('_'));
|
| + // Show the exception types separately.
|
| + final types = <Type>[];
|
| + final exceptions = <Type>[];
|
|
|
| - if (types.length == 0) return;
|
| + for (final type in orderByName(library.types)) {
|
| + if (type.isTop) continue;
|
| + if (type.name.startsWith('_')) continue;
|
|
|
| - writeln('<ul>');
|
| - for (final type in types) {
|
| - var icon = 'icon-interface';
|
| if (type.name.endsWith('Exception')) {
|
| - icon = 'icon-exception';
|
| - } else if (type.isClass) {
|
| - icon = 'icon-class';
|
| + exceptions.add(type);
|
| + } else {
|
| + types.add(type);
|
| }
|
| - write('<li>');
|
| + }
|
| +
|
| + if ((types.length == 0) && (exceptions.length == 0)) return;
|
|
|
| + writeType(String icon, Type type) {
|
| + write('<li>');
|
| if (_currentType == type) {
|
| - write('<div class="$icon"></div><strong>${typeName(type)}</strong>');
|
| + write(
|
| + '<div class="icon-$icon"></div><strong>${typeName(type)}</strong>');
|
| } else {
|
| - write(a(typeUrl(type), '<div class="$icon"></div>${typeName(type)}'));
|
| + write(a(typeUrl(type),
|
| + '<div class="icon-$icon"></div>${typeName(type)}'));
|
| }
|
| -
|
| writeln('</li>');
|
| }
|
| +
|
| + writeln('<ul>');
|
| + types.forEach((type) => writeType(type.isClass ? 'class' : 'interface',
|
| + type));
|
| + exceptions.forEach((type) => writeType('exception', type));
|
| writeln('</ul>');
|
| }
|
|
|
|
|