1 package org.simantics.scl.osgi.internal;
3 import java.util.Hashtable;
5 import org.osgi.framework.BundleActivator;
6 import org.osgi.framework.BundleContext;
7 import org.simantics.scl.compiler.source.repository.ModuleSourceRepository;
8 import org.simantics.scl.compiler.source.repository.SourceRepositories;
10 public class Activator implements BundleActivator {
12 private static BundleContext context;
14 public static BundleContext getContext() {
18 @SuppressWarnings({ "rawtypes", "unchecked" })
19 public void start(BundleContext bundleContext) throws Exception {
20 Activator.context = bundleContext;
22 Hashtable properties = new Hashtable();
23 bundleContext.registerService(ModuleSourceRepository.class,
24 SourceRepositories.BUILTIN_SOURCE_REPOSITORY,
28 public void stop(BundleContext bundleContext) throws Exception {
29 Activator.context = null;