code: private ModifableExtensionPlanNode installExtensionDependency(ExtensionDependency targetDependency,
          boolean dependency, String namespace, Map<String, ExtensionDependency> managedDependencies, Set<String> parents)
          throws InstallException
      {
          this.progressManager.pushLevelProgress(2, this);
  
          try {
              this.progressManager.startStep(this);
  
              // Check if the extension is already in local repository
              Extension extension = resolveExtension(targetDependency);
  
              // Rewrite the extension
              Extension rewrittenExtension;
              if (getRequest().getRewriter() != null) {
                  rewrittenExtension = getRequest().getRewriter().rewrite(extension);
              } else {
                  rewrittenExtension = extension;
              }
  
              this.progressManager.endStep(this);
  
              this.progressManager.startStep(this);
  
              try {
                  return installExtension(extension, rewrittenExtension, dependency, namespace, targetDependency,
                      managedDependencies, parents);
              } catch (Exception e) {
                  throw new InstallException(
                      String.format("Failed to create an install plan for extension dependency [%s]", targetDependency),
                      e);
              }
          } finally {
              this.progressManager.popLevelProgress(this);
          }
      }
docs: Install provided extension.
  
  @param targetDependency used to search the extension to install in remote repositories
  @param dependency indicate if the extension is installed as a dependency
  @param namespace the namespace where to install the extension
  @param managedDependencies the managed dependencies
  @param parents the parents extensions (which triggered this extension install)
  @return the install plan node for the provided extension
  @throws InstallException error when trying to install provided extension