long start = System.currentTimeMillis();
lifecycleProviderEntry = detectLifecycleProvider();
if (lifecycleProviderEntry != null)
{
final AddonLifecycleProvider lifecycleProvider = lifecycleProviderEntry.getProvider();
ClassLoaders.executeIn(addon.getClassLoader(), new Callable<Void>()
{
@Override
public Void call() throws Exception
{
lifecycleProvider.initialize(furnace, furnace.getAddonRegistry(getRepositories()),
lifecycleProviderEntry.getAddon());
lifecycleProvider.start(addon);
stateManager.setServiceRegistry(addon, lifecycleProvider.getServiceRegistry(addon));
stateManager.setEventManager(addon, lifecycleProvider.getEventManager(addon));
for (AddonDependency dependency : addon.getDependencies())
{
if (dependency.getDependency().getStatus().isLoaded())
Addons.waitUntilStarted(dependency.getDependency());
}
lifecycleProvider.postStartup(addon);
for (AddonView view : stateManager.getViewsOf(addon))
{
for (Addon a : view.getAddons(notThisAddonFilter))
{
a.getEventManager().fireEvent(new PostStartup(addon));