示例#1
0
 def _EnsureNoMultipleTypeSignatures(self, interface, operation,
     operations_by_name):
   """Make sure that there is now at most one operation with a particular
   operation.id. If not, stop library generation, and throw an error, requiring
   programmer input about the best name change before proceeding."""
   operation_str = '%s.%s' % (interface.id, operation.id)
   if (operation.id in operations_by_name and
       len(operations_by_name[operation.id]) > 1 and
       len(filter(lambda overload: overload.startswith(operation_str),
           renamed_overloads.keys())) == 0 and
       operation_str not in keep_overloaded_members and
       operation_str not in overloaded_and_renamed and
       operation_str not in renamed_html_members and
       operation_str not in private_html_members and
       operation_str not in removed_html_members and
       operation.id != '__getter__' and
       operation.id != '__setter__' and
       operation.id != '__delete__'):
     _logger.error('Multiple type signatures for %s.%s. Please file a bug with'
         ' the dart:html team to determine if one of these functions should be'
         ' renamed.' % (
         interface.id, operation.id))
 def _EnsureNoMultipleTypeSignatures(self, interface, operation,
     operations_by_name):
   """Make sure that there is now at most one operation with a particular
   operation.id. If not, stop library generation, and throw an error, requiring
   programmer input about the best name change before proceeding."""
   operation_str = '%s.%s' % (interface.id, operation.id)
   if (operation.id in operations_by_name and
       len(operations_by_name[operation.id]) > 1 and
       len(filter(lambda overload: overload.startswith(operation_str),
           renamed_overloads.keys())) == 0 and
       operation_str not in keep_overloaded_members and
       operation_str not in overloaded_and_renamed and
       operation_str not in renamed_html_members and
       operation_str not in private_html_members and
       operation_str not in removed_html_members and
       operation.id != '__getter__' and
       operation.id != '__setter__' and
       operation.id != '__delete__'):
     _logger.error('Multiple type signatures for %s.%s. Please file a bug with'
         ' the dart:html team to determine if one of these functions should be'
         ' renamed.' % (
         interface.id, operation.id))
 def _EnsureNoMultipleTypeSignatures(self, interface, operation,
     operations_by_name):
   """Make sure that there is now at most one operation with a particular
   operation.id. If not, stop library generation, and throw an error, requiring
   programmer input about the best name change before proceeding."""
   operation_str = '%s.%s' % (interface.id, operation.id)
   if (operation.id in operations_by_name and
       len(operations_by_name[operation.id]) > 1 and
       len(filter(lambda overload: overload.startswith(operation_str),
           renamed_overloads.keys())) == 0 and
       operation_str not in keep_overloaded_members and
       operation_str not in renamed_html_members and
       operation_str not in private_html_members and
       operation_str not in dom_private_html_members and
       operation_str not in removed_html_members and
       operation.id != '__getter__' and
       operation.id != '__setter__' and
       operation.id != '__delete__'):
     _logger.error('Multiple type signatures for %s.%s' % (
         interface.id, operation.id))
     raise Exception('Rename one of the methods in renamed_overloads or add it'
         ' to  keep_overloaded_members.\n'
         'Generation UNsuccessful.')