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

Unified Diff: mojo/public/tools/bindings/generators/mojom_java_generator.py

Issue 601213002: Fix mojom Java generator running on its own. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Ben's (off-cl) comments. Created 6 years, 3 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: mojo/public/tools/bindings/generators/mojom_java_generator.py
diff --git a/mojo/public/tools/bindings/generators/mojom_java_generator.py b/mojo/public/tools/bindings/generators/mojom_java_generator.py
index 7df6358c786fe27e6c9a698d4725bdf36fdc7d0c..8b4fd25e0ce51a31782e485179dcc264ca5ff801 100644
--- a/mojo/public/tools/bindings/generators/mojom_java_generator.py
+++ b/mojo/public/tools/bindings/generators/mojom_java_generator.py
@@ -431,14 +431,16 @@ class Generator(generator.Generator):
# Ignore errors on directory creation.
pass
+ # Keep this above the others as .GetStructs() changes the state of the
+ # module, annotating structs with required information.
+ for struct in self.GetStructs():
+ self.Write(self.GenerateStructSource(struct),
+ '%s.java' % GetNameForElement(struct))
+
for enum in self.module.enums:
self.Write(self.GenerateEnumSource(enum),
'%s.java' % GetNameForElement(enum))
- for struct in self.module.structs:
- self.Write(self.GenerateStructSource(struct),
- '%s.java' % GetNameForElement(struct))
-
for interface in self.module.interfaces:
self.Write(self.GenerateInterfaceSource(interface),
'%s.java' % GetNameForElement(interface))
« 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