package org.simantics.scl.reflection.internal;
-import java.util.concurrent.ForkJoinPool;
-
import org.eclipse.core.runtime.ILog;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
-import org.simantics.scl.reflection.internal.registry.BindingRegistry;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public void start(BundleContext context) throws Exception {
this.context = context;
instance = this;
-
- primeBindingRegistry();
- }
-
- private static void primeBindingRegistry() {
- LOGGER.info("Priming BindingRegistry");
- ForkJoinPool.commonPool().submit(() -> {
- try {
- // this forces static initialzation of the registry in advance
- BindingRegistry.primeBindingRegistry();
- } catch (Exception e) {
- LOGGER.error("Could not prime binding registry", e);
- }
- LOGGER.info("Priming done");
- });
}
@Override