use of org.knime.core.util.IEarlyStartup in project knime-core by knime.
the class WorkflowManager method executeEarlyStartup.
private static void executeEarlyStartup() {
String extPointId = "org.knime.core.EarlyStartup";
IExtensionRegistry registry = Platform.getExtensionRegistry();
IExtensionPoint point = registry.getExtensionPoint(extPointId);
assert point != null : "Invalid extension point id: " + extPointId;
Iterator<IConfigurationElement> it = Stream.of(point.getExtensions()).flatMap(ext -> Stream.of(ext.getConfigurationElements())).iterator();
while (it.hasNext()) {
IConfigurationElement e = it.next();
try {
((IEarlyStartup) e.createExecutableExtension("class")).run();
} catch (CoreException ex) {
LOGGER.error("Could not create early startup object od class '" + e.getAttribute("class") + "' " + "from plug-in '" + e.getContributor().getName() + "': " + ex.getMessage(), ex);
} catch (Exception ex) {
LOGGER.error("Early startup in '" + e.getAttribute("class") + " from plug-in '" + e.getContributor().getName() + "' has thrown an uncaught exception: " + ex.getMessage(), ex);
}
}
}
Aggregations