private void collectRequiredAddons ( AddonInfo addonInfo , List < AddonInfo > addons ) { // Move this addon to the top of the list addons . remove ( addonInfo ) ; addons . add ( 0 , addonInfo ) ; for ( AddonId addonId : addonInfo . getRequiredAddons ( ) ) { if ( ! addons . contains ( addonId ) && ( ! isDeployed ( addonId ) || ! isEnabled ( addonId ) ) ) { AddonInfo childInfo = info ( addonId ) ; collectRequiredAddons ( childInfo , addons ) ; } } }
Collect all required addons for a specific addon .