1 package org.simantics.audit;
3 import java.nio.file.Path;
4 import java.nio.file.Paths;
6 import org.eclipse.core.runtime.IPath;
7 import org.eclipse.core.runtime.Platform;
8 import org.osgi.framework.BundleActivator;
9 import org.osgi.framework.BundleContext;
11 public class Activator implements BundleActivator {
13 private static BundleContext context;
14 private static Path logLocation;
16 static BundleContext getContext() {
22 * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
24 public void start(BundleContext bundleContext) throws Exception {
25 Activator.context = bundleContext;
26 IPath ipath = Platform.getStateLocation(getContext().getBundle());
27 logLocation = Paths.get(ipath.toOSString());
32 * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
34 public void stop(BundleContext bundleContext) throws Exception {
35 Activator.context = null;
38 public static Path getLogLocation() {