{
Set<AddonId> enabled = getAllEnabled();
tree.breadthFirst(new MarkDisabledLoadedAddonsDirtyVisitor(tree, enabled));
CheckDirtyStatusVisitor dirty;
do
{
dirty = new CheckDirtyStatusVisitor();
tree.breadthFirst(new StopDirtyAddonsVisitor(tree));
tree.depthFirst(dirty);
}
while (dirty.isDirty());
for (AddonId addonId : enabled)
{
loadAddon(addonId);
}