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

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

Issue 2863353002: Mojo code generator: change where to add computed data to mojom definitions (Closed)
Patch Set: . Created 3 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
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 33c47c834d500ee06e266f4cf08d618ff262a8a0..3e6f63a120f655160a14694065305032b62bc0c0 100644
--- a/mojo/public/tools/bindings/generators/mojom_java_generator.py
+++ b/mojo/public/tools/bindings/generators/mojom_java_generator.py
@@ -486,9 +486,7 @@ class Generator(generator.Generator):
def _DoGenerateFiles(self):
fileutil.EnsureDirectoryExists(self.output_dir)
- # Keep this above the others as .GetStructs() changes the state of the
- # module, annotating structs with required information.
- for struct in self.GetStructs():
+ for struct in self.module.structs:
self.Write(self._GenerateStructSource(struct),
'%s.java' % GetNameForElement(struct))
@@ -500,7 +498,7 @@ class Generator(generator.Generator):
self.Write(self._GenerateEnumSource(enum),
'%s.java' % GetNameForElement(enum))
- for interface in self.GetInterfaces():
+ for interface in self.module.interfaces:
self.Write(self._GenerateInterfaceSource(interface),
'%s.java' % GetNameForElement(interface))
self.Write(self._GenerateInterfaceInternalSource(interface),

Powered by Google App Engine
This is Rietveld 408576698