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

Unified Diff: utils/apidoc/html_diff.dart

Issue 119913002: Align source mirrors with runtime mirrors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments + small fix. Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « utils/apidoc/apidoc.dart ('k') | utils/apidoc/lib/metadata.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/apidoc/html_diff.dart
diff --git a/utils/apidoc/html_diff.dart b/utils/apidoc/html_diff.dart
index 45ae9dd52f25c9a048b3bcc02790826d4c1cb3f6..85c49c9ae41e8125929ae9207695a50d699f88e7 100644
--- a/utils/apidoc/html_diff.dart
+++ b/utils/apidoc/html_diff.dart
@@ -9,17 +9,14 @@
library html_diff;
import 'dart:async';
-import 'dart:io';
import 'lib/metadata.dart';
// TODO(rnystrom): Use "package:" URL (#4968).
-import '../../sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart';
-import '../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart';
+import '../../sdk/lib/_internal/compiler/implementation/mirrors/analyze.dart';
+import '../../sdk/lib/_internal/compiler/implementation/mirrors/source_mirrors.dart';
import '../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors_util.dart';
import '../../sdk/lib/_internal/compiler/implementation/source_file_provider.dart';
-import '../../sdk/lib/_internal/dartdoc/lib/dartdoc.dart';
-import '../../sdk/lib/html/html_common/metadata.dart';
// TODO(amouravski): There is currently magic that looks at dart:* libraries
// rather than the declared library names. This changed due to recent syntax
@@ -103,15 +100,15 @@ class HtmlDiff {
warn('Could not find $libraryUri');
result.complete(false);
}
- for (ClassMirror type in library.classes.values) {
+ for (ClassMirror type in classesOf(library.declarations)) {
final domTypes = htmlToDomTypes(type);
if (domTypes.isEmpty) continue;
- htmlTypesToDom.putIfAbsent(type.qualifiedName,
+ htmlTypesToDom.putIfAbsent(qualifiedNameOf(type),
() => new Set()).addAll(domTypes);
- type.members.forEach(
- (_, m) => _addMemberDiff(m, domTypes, library.simpleName));
+ membersOf(type.declarations).forEach(
+ (m) => _addMemberDiff(m, domTypes, nameOf(library)));
}
}
result.complete(true);
@@ -125,7 +122,7 @@ class HtmlDiff {
* `@DomName` type values that correspond to [htmlMember]'s
* defining type.
*/
- void _addMemberDiff(MemberMirror htmlMember, List<String> domTypes,
+ void _addMemberDiff(DeclarationMirror htmlMember, List<String> domTypes,
String libraryName) {
var domMembers = htmlToDomMembers(htmlMember, domTypes);
if (htmlMember == null && !domMembers.isEmpty) {
@@ -137,7 +134,7 @@ class HtmlDiff {
if (htmlMember == null) return;
if (!domMembers.isEmpty) {
- htmlToDom[htmlMember.qualifiedName] = domMembers;
+ htmlToDom[qualifiedNameOf(htmlMember)] = domMembers;
}
}
@@ -152,7 +149,7 @@ class HtmlDiff {
final domNameMetadata = findMetadata(htmlType.metadata, 'DomName');
if (domNameMetadata != null) {
var domNames = <String>[];
- var names = domNameMetadata.getField('name');
+ var names = domNameMetadata.getField(symbolOf('name'));
for (var s in names.reflectee.split(',')) {
domNames.add(s.trim());
}
@@ -170,13 +167,14 @@ class HtmlDiff {
* `@DomName` type values that correspond to [htmlMember]'s
* defining type.
*/
- Set<String> htmlToDomMembers(MemberMirror htmlMember, List<String> domTypes) {
+ Set<String> htmlToDomMembers(DeclarationMirror htmlMember,
+ List<String> domTypes) {
if (htmlMember.isPrivate) return new Set();
final domNameMetadata = findMetadata(htmlMember.metadata, 'DomName');
if (domNameMetadata != null) {
var domNames = <String>[];
- var names = domNameMetadata.getField('name');
+ var names = domNameMetadata.getField(symbolOf('name'));
for (var s in names.reflectee.split(',')) {
domNames.add(s.trim());
}
« no previous file with comments | « utils/apidoc/apidoc.dart ('k') | utils/apidoc/lib/metadata.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698