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

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

Issue 10703194: Extract interfaces and members renaming logic to a new HtmlRenamer class. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: . Created 8 years, 5 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/dartgenerator.py ('k') | lib/dom/scripts/generator.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) 2011, the Dart project authors. Please see the AUTHORS file 2 # Copyright (c) 2011, 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 """Module to manage IDL files.""" 6 """Module to manage IDL files."""
7 7
8 import copy 8 import copy
9 import pickle 9 import pickle
10 import logging 10 import logging
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 raise RuntimeError('Interface %s not found' % interface_name) 218 raise RuntimeError('Interface %s not found' % interface_name)
219 self._interfaces_to_delete.append(interface_name) 219 self._interfaces_to_delete.append(interface_name)
220 del self._all_interfaces[interface_name] 220 del self._all_interfaces[interface_name]
221 221
222 def _DeleteInterfaceFile(self, interface_name): 222 def _DeleteInterfaceFile(self, interface_name):
223 """Actual file deletion""" 223 """Actual file deletion"""
224 file_path = self._FilePath(interface_name) 224 file_path = self._FilePath(interface_name)
225 if os.path.exists(file_path): 225 if os.path.exists(file_path):
226 _logger.debug('deleting %s' % file_path) 226 _logger.debug('deleting %s' % file_path)
227 os.remove(file_path) 227 os.remove(file_path)
228
229 def Hierarchy(self, interface):
230 yield interface
231 for parent in interface.parents:
232 parent_name = parent.type.id
233 if not self.HasInterface(parent.type.id):
234 continue
235 for parent_interface in self.Hierarchy(self.GetInterface(parent.type.id)):
236 yield parent_interface
OLDNEW
« no previous file with comments | « lib/dom/scripts/dartgenerator.py ('k') | lib/dom/scripts/generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698