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

Side by Side Diff: lib/dom/scripts/dartgenerator.py

Issue 10541029: Do not merge IDL interfaces in dartdomgenerator. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | lib/dom/scripts/systemfrog.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
3 # for details. All rights reserved. Use of this source code is governed by a 3 # for details. All rights reserved. Use of this source code is governed by a
4 # BSD-style license that can be found in the LICENSE file. 4 # BSD-style license that can be found in the LICENSE file.
5 5
6 """This module generates Dart APIs from the IDL database.""" 6 """This module generates Dart APIs from the IDL database."""
7 7
8 import emitter 8 import emitter
9 import idlnode 9 import idlnode
10 import logging 10 import logging
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 """ 73 """
74 74
75 if conversion_table is None: 75 if conversion_table is None:
76 conversion_table = {} 76 conversion_table = {}
77 77
78 # Rename interfaces: 78 # Rename interfaces:
79 for old_name, new_name in conversion_table.items(): 79 for old_name, new_name in conversion_table.items():
80 if database.HasInterface(old_name): 80 if database.HasInterface(old_name):
81 _logger.info('renaming interface %s to %s' % (old_name, new_name)) 81 _logger.info('renaming interface %s to %s' % (old_name, new_name))
82 interface = database.GetInterface(old_name) 82 interface = database.GetInterface(old_name)
83 database.DeleteInterface(old_name)
84 if not database.HasInterface(new_name): 83 if not database.HasInterface(new_name):
85 interface.id = new_name 84 interface.id = new_name
85 database.DeleteInterface(old_name)
86 database.AddInterface(interface) 86 database.AddInterface(interface)
87 else:
88 new_interface = database.GetInterface(new_name)
89 MergeNodes(new_interface, interface)
90 87
91 if rename_javascript_binding_names: 88 if rename_javascript_binding_names:
92 interface.javascript_binding_name = new_name 89 interface.javascript_binding_name = new_name
93 interface.doc_js_name = new_name 90 interface.doc_js_name = new_name
94 for member in (interface.operations + interface.constants 91 for member in (interface.operations + interface.constants
95 + interface.attributes): 92 + interface.attributes):
96 member.doc_js_interface_name = new_name 93 member.doc_js_interface_name = new_name
97 94
98 95
99 # Fix references: 96 # Fix references:
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 PARAMETERS=constructor_info.ParametersImplementationDeclaration()) 388 PARAMETERS=constructor_info.ParametersImplementationDeclaration())
392 389
393 def FinishInterface(self): 390 def FinishInterface(self):
394 pass 391 pass
395 392
396 def AddTypedArrayConstructors(self, element_type): 393 def AddTypedArrayConstructors(self, element_type):
397 pass 394 pass
398 395
399 def AddEventAttributes(self, event_attrs): 396 def AddEventAttributes(self, event_attrs):
400 pass 397 pass
OLDNEW
« no previous file with comments | « no previous file | lib/dom/scripts/systemfrog.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698