protected static boolean uninstallAddOnExtension(AddOn addOn,Extension extension,AddOnUninstallationProgressCallback callback){
  boolean uninstalledWithoutErrors=true;
  if (extension.isEnabled()) {
    String extUiName=extension.getUIName();
    if (extension.canUnload()) {
      logger.debug("Unloading ext: " + extension.getName());
      try {
        extension.unload();
        ExtensionFactory.unloadAddOnExtension(extension);
      }
 catch (      Exception e) {
        logger.error("An error occurred while uninstalling the extension \"" + extension.getName() + "\" bundled in the add-on \""+ addOn.getId()+ "\":",e);
        uninstalledWithoutErrors=false;
      }
    }
 else {
      logger.debug("Cant dynamically unload ext: " + extension.getName());
      uninstalledWithoutErrors=false;
    }
    callback.extensionRemoved(extUiName);
  }
  addOn.removeLoadedExtension(extension);
  return uninstalledWithoutErrors;
}

protected static boolean uninstallAddOnExtension ( AddOn addOn , Extension extension , AddOnUninstallationProgressCallback callback ) { boolean uninstalledWithoutErrors = true ; if ( extension . isEnabled ( ) ) { String extUiName = extension . getUIName ( ) ; if ( extension . canUnload ( ) ) { logger . debug ( "Unloading ext: " + extension . getName ( ) ) ; try { extension . unload ( ) ; ExtensionFactory . unloadAddOnExtension ( extension ) ; } catch ( Exception e ) { logger . error ( "An error occurred while uninstalling the extension \"" + extension . getName ( ) + "\" bundled in the add-on \"" + addOn . getId ( ) + "\":" , e ) ; uninstalledWithoutErrors = false ; } } else { logger . debug ( "Cant dynamically unload ext: " + extension . getName ( ) ) ; uninstalledWithoutErrors = false ; } callback . extensionRemoved ( extUiName ) ; } addOn . removeLoadedExtension ( extension ) ; return uninstalledWithoutErrors ; }
uninstalls the given extension .
