1 package org.simantics.scl.reflection.internal;
3 import org.eclipse.core.runtime.ILog;
4 import org.eclipse.core.runtime.Platform;
5 import org.eclipse.core.runtime.Status;
6 import org.osgi.framework.Bundle;
7 import org.osgi.framework.BundleActivator;
8 import org.osgi.framework.BundleContext;
10 public class Activator implements BundleActivator {
12 private BundleContext context;
14 private static Activator instance;
17 public void start(BundleContext context) throws Exception {
18 this.context = context;
23 public void stop(BundleContext context) throws Exception {
28 public BundleContext getContext() {
32 public static Activator getInstance() {
36 public static void logError(String description, Exception e) {
37 System.err.println(description);
40 Bundle bundle = getInstance().getContext().getBundle();
41 ILog log = Platform.getLog(bundle);
42 log.log(new Status(Status.ERROR, bundle.getSymbolicName(), description, e));
45 public static void logError(String description) {
46 logError(description, null);