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

Unified Diff: tools/dom/scripts/htmldartgenerator.py

Issue 15043005: Adding annotations to DOM constants (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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 | « sdk/lib/web_sql/dartium/web_sql_dartium.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/scripts/htmldartgenerator.py
diff --git a/tools/dom/scripts/htmldartgenerator.py b/tools/dom/scripts/htmldartgenerator.py
index d22b6cd74297a383336f0611ec6b6039ebdc8c07..1bcba48b4bbc2472cc6f3bfb2174cf7c12ea835f 100644
--- a/tools/dom/scripts/htmldartgenerator.py
+++ b/tools/dom/scripts/htmldartgenerator.py
@@ -131,8 +131,14 @@ class HtmlDartGenerator(object):
self._interface.id, constant, constant.id, 'get:', dartify_name=False)
if not const_name:
return
+
+ annotations = self._metadata.GetFormattedMetadata(
+ self._library_name, self._interface, constant.id, ' ')
+
type = TypeOrNothing(self._DartType(constant.type.id), constant.type.id)
- self._members_emitter.Emit('\n static const $TYPE$NAME = $VALUE;\n',
+ self._members_emitter.Emit(
+ '\n $(ANNOTATIONS)static const $TYPE$NAME = $VALUE;\n',
+ ANNOTATIONS=annotations,
NAME=const_name,
TYPE=type,
VALUE=constant.value)
« no previous file with comments | « sdk/lib/web_sql/dartium/web_sql_dartium.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698