code: protected boolean tryInstallExtension(ExtensionId extensionId, String namespace)
      {
          DefaultExtensionPlanTree currentTree = this.extensionTree.clone();
  
          try {
              installExtension(extensionId, namespace, currentTree);
  
              setExtensionTree(currentTree);
  
              return true;
          } catch (InstallException e) {
              if (getRequest().isVerbose()) {
                  this.logger.info(FAILED_INSTALL_MESSAGE, extensionId, namespace, e);
              } else {
                  this.logger.debug(FAILED_INSTALL_MESSAGE, extensionId, namespace, e);
              }
          }
  
          return false;
      }
docs: Try to install the provided extension and update the plan if it's working.
  
  @param extensionId the extension version to install
  @param namespace the namespace where to install the extension
  @return true if the installation would succeed, false otherwise