Search in sources :

Example 1 with ExtensionsInitializedEvent

use of org.eclipse.che.ide.api.extension.ExtensionsInitializedEvent in project che by eclipse.

the class ExtensionInitializer method startExtensions.

public void startExtensions() {
    Map<String, Provider> providers = extensionManager.getExtensions();
    for (Entry<String, Provider> entry : providers.entrySet()) {
        final String extensionFqn = entry.getKey();
        final Provider extensionProvider = entry.getValue();
        try {
            // Order of startup is managed by GIN dependency injection framework
            extensionProvider.get();
        } catch (Throwable e) {
            Log.error(ExtensionInitializer.class, "Can't initialize extension: " + extensionFqn, e);
        }
    }
    eventBus.fireEvent(new ExtensionsInitializedEvent());
}
Also used : ExtensionsInitializedEvent(org.eclipse.che.ide.api.extension.ExtensionsInitializedEvent) Provider(com.google.inject.Provider)

Aggregations

Provider (com.google.inject.Provider)1 ExtensionsInitializedEvent (org.eclipse.che.ide.api.extension.ExtensionsInitializedEvent)1