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

Unified Diff: trunk/src/mojo/public/tools/bindings/generators/java_templates/constant_definition.tmpl

Issue 354833003: Revert 279677 "Generate java bindings for structs." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 6 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
Index: trunk/src/mojo/public/tools/bindings/generators/java_templates/constant_definition.tmpl
===================================================================
--- trunk/src/mojo/public/tools/bindings/generators/java_templates/constant_definition.tmpl (revision 279687)
+++ trunk/src/mojo/public/tools/bindings/generators/java_templates/constant_definition.tmpl (working copy)
@@ -1,3 +1,5 @@
+{% from "java_macros.tmpl" import build_default %}
+
{% macro constant_def(constant) %}
-public static final {{constant.kind|java_type}} {{constant|name}} = ({{constant.kind|java_type}}) {{constant.value|expression_to_text}};
+public static final {{constant.kind|java_type}} {{constant|name}} = {{build_default(module, constant.kind, constant.value)|indent(4)}};
{% endmacro %}

Powered by Google App Engine
This is Rietveld 408576698