Index: pkg/analyzer_plugin/tool/spec/to_html.dart |
diff --git a/pkg/analyzer_plugin/tool/spec/to_html.dart b/pkg/analyzer_plugin/tool/spec/to_html.dart |
index b5096d1d64f845aaa4b4084e2da192730eea6aae..f71f98cc6d596327c385e7d0a6908ad5bc158811 100644 |
--- a/pkg/analyzer_plugin/tool/spec/to_html.dart |
+++ b/pkg/analyzer_plugin/tool/spec/to_html.dart |
@@ -344,9 +344,11 @@ class ToHtmlVisitor extends HierarchicalApiVisitor |
link('types', () => write('\u2191')); |
write(')'); |
}); |
+ List<String> sortedTypes = types.toList(); |
+ sortedTypes.sort(); |
element('div', {'class': 'subindex'}, () { |
element('ul', {}, () { |
- for (var type in types) { |
+ for (var type in sortedTypes) { |
element('li', {}, () => link('type_$type', () => write(type))); |
} |
}); |
@@ -434,7 +436,7 @@ class ToHtmlVisitor extends HierarchicalApiVisitor |
generateIndex(); |
break; |
default: |
- if (!specialElements.contains(node.localName)) { |
+ if (!ApiReader.specialElements.contains(node.localName)) { |
element(node.localName, node.attributes, () { |
translateHtml(node, squashParagraphs: squashParagraphs); |
}); |
@@ -655,7 +657,10 @@ class ToHtmlVisitor extends HierarchicalApiVisitor |
void visitTypes(Types types) { |
translateHtml(types.html); |
dl(() { |
- super.visitTypes(types); |
+ List<TypeDefinition> sortedTypes = types.toList(); |
+ sortedTypes.sort((TypeDefinition first, TypeDefinition second) => |
+ first.name.compareTo(second.name)); |
+ sortedTypes.forEach(visitTypeDefinition); |
}); |
} |
} |