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

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

Issue 10068019: Fix ApiDoc to work with new dart:html code. Tweak dart:html generator to generate clearer @domName … (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review fixes Created 8 years, 8 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 | « lib/dom/scripts/dartdomgenerator.py ('k') | lib/dom/scripts/idlnode.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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 _logger.info('renaming interface %s to %s' % (old_name, new_name)) 101 _logger.info('renaming interface %s to %s' % (old_name, new_name))
102 interface = database.GetInterface(old_name) 102 interface = database.GetInterface(old_name)
103 database.DeleteInterface(old_name) 103 database.DeleteInterface(old_name)
104 if not database.HasInterface(new_name): 104 if not database.HasInterface(new_name):
105 interface.id = new_name 105 interface.id = new_name
106 database.AddInterface(interface) 106 database.AddInterface(interface)
107 else: 107 else:
108 new_interface = database.GetInterface(new_name) 108 new_interface = database.GetInterface(new_name)
109 MergeNodes(new_interface, interface) 109 MergeNodes(new_interface, interface)
110 110
111 interface.javascript_binding_name = (old_name if rename_javascript_bindi ng_names 111 if rename_javascript_binding_names:
112 else new_name) 112 interface.javascript_binding_name = new_name
113 interface.doc_js_name = new_name
114 for member in (interface.operations + interface.constants
115 + interface.attributes):
116 member.doc_js_interface_name = new_name
117
113 118
114 # Fix references: 119 # Fix references:
115 for interface in database.GetInterfaces(): 120 for interface in database.GetInterfaces():
116 for idl_type in interface.all(idlnode.IDLType): 121 for idl_type in interface.all(idlnode.IDLType):
117 type_name = self._StripModules(idl_type.id) 122 type_name = self._StripModules(idl_type.id)
118 if type_name in conversion_table: 123 if type_name in conversion_table:
119 idl_type.id = conversion_table[type_name] 124 idl_type.id = conversion_table[type_name]
120 125
121 def FilterMembersWithUnidentifiedTypes(self, database): 126 def FilterMembersWithUnidentifiedTypes(self, database):
122 """Removes unidentified types. 127 """Removes unidentified types.
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 pass 630 pass
626 631
627 def AddTypedArrayConstructors(self, element_type): 632 def AddTypedArrayConstructors(self, element_type):
628 pass 633 pass
629 634
630 def AddOperation(self, info): 635 def AddOperation(self, info):
631 pass 636 pass
632 637
633 def AddEventAttributes(self, event_attrs): 638 def AddEventAttributes(self, event_attrs):
634 pass 639 pass
OLDNEW
« no previous file with comments | « lib/dom/scripts/dartdomgenerator.py ('k') | lib/dom/scripts/idlnode.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698