parameters: (self, idl, allow_existing=False)
docstring: Registers an IDL file with this instance.
  
          The IDL file will be built, installed, etc.
docstring_summary: Registers an IDL file with this instance.
docstring_tokens: Registers an IDL file with this instance .
function: def register_idl(self, idl, allow_existing=False):
          """Registers an IDL file with this instance.
  
          The IDL file will be built, installed, etc.
          """
          basename = mozpath.basename(idl.source_path)
          root = mozpath.splitext(basename)[0]
          xpt = '%s.xpt' % idl.module
          manifest = mozpath.join(idl.install_target, 'components', 'interfaces.manifest')
          chrome_manifest = mozpath.join(idl.install_target, 'chrome.manifest')
  
          entry = {
              'source': idl.source_path,
              'module': idl.module,
              'basename': basename,
              'root': root,
              'manifest': manifest,
          }
  
          if not allow_existing and entry['basename'] in self.idls:
              raise Exception('IDL already registered: %s' % entry['basename'])
  
          self.idls[entry['basename']] = entry
          t = self.modules.setdefault(entry['module'], (idl.install_target, set()))
          t[1].add(entry['root'])
  
          if idl.add_to_manifest:
              self.interface_manifests.setdefault(manifest, set()).add(xpt)
              self.chrome_manifests.add(chrome_manifest)
function_tokens: def register_idl ( self , idl , allow_existing = False ) : basename = mozpath . basename ( idl . source_path ) root = mozpath . splitext ( basename ) [ 0 ] xpt = '%s.xpt' % idl . module manifest = mozpath . join ( idl . install_target , 'components' , 'interfaces.manifest' ) chrome_manifest = mozpath . join ( idl . install_target , 'chrome.manifest' ) entry = { 'source' : idl . source_path , 'module' : idl . module , 'basename' : basename , 'root' : root , 'manifest' : manifest , } if not allow_existing and entry [ 'basename' ] in self . idls : raise Exception ( 'IDL already registered: %s' % entry [ 'basename' ] ) self . idls [ entry [ 'basename' ] ] = entry t = self . modules . setdefault ( entry [ 'module' ] , ( idl . install_target , set ( ) ) ) t [ 1 ] . add ( entry [ 'root' ] ) if idl . add_to_manifest : self . interface_manifests . setdefault ( manifest , set ( ) ) . add ( xpt ) self . chrome_manifests . add ( chrome_manifest )