code: private DefaultInstalledExtension addInstalledExtension(LocalExtension localExtension, String namespace,
          boolean valid)
      {
          DefaultInstalledExtension installedExtension = this.extensions.get(localExtension.getId());
          if (installedExtension == null) {
              installedExtension = new DefaultInstalledExtension(localExtension, this);
          }
  
          installedExtension.setInstalled(true, namespace);
          installedExtension.setValid(namespace, valid);
  
          addInstalledExtension(installedExtension, namespace);
  
          return installedExtension;
      }
docs: Register a newly installed extension in backward dependencies map.
  
  @param localExtension the local extension to register
  @param namespace the namespace
  @param valid is the extension valid
  @return the new {@link DefaultInstalledExtension}