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

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

Issue 23094004: Filter annotations for only important ones (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/docgen/lib/docgen.dart
diff --git a/pkg/docgen/lib/docgen.dart b/pkg/docgen/lib/docgen.dart
index bca15b6f0def7788d96289be2171d5bb9d8442c0..b67a321e5d309796d9614b00f60b8aa1d7c957dd 100644
--- a/pkg/docgen/lib/docgen.dart
+++ b/pkg/docgen/lib/docgen.dart
@@ -37,6 +37,11 @@ var logger = new Logger('Docgen');
const String USAGE = 'Usage: dart docgen.dart [OPTIONS] [fooDir/barFile]';
+
+List<String> validAnnotations = const ['metadata.Experimental',
+ 'metadata.DomName', 'metadata.Deprecated', 'metadata.Unstable',
+ 'meta.deprecated', 'metadata.SupportedBrowser'];
+
/// Current library being documented to be used for comment links.
LibraryMirror _currentLibrary;
@@ -318,8 +323,10 @@ List<String> _annotations(DeclarationMirror mirror) {
.map((e) => annotation.getField(e.simpleName).reflectee)
.where((e) => e != null)
.toList();
- annotations.add(new Annotation(annotation.type.qualifiedName,
- parameterList));
+ if (validAnnotations.contains(annotation.type.qualifiedName)) {
+ annotations.add(new Annotation(annotation.type.qualifiedName,
+ parameterList));
+ }
});
return annotations;
}
« 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