diff options
Diffstat (limited to 'extraplugins/layers/org.eclipse.papyrus.layers.runtime/src/org/eclipse/papyrus/layers/runtime/Activator.java')
-rw-r--r-- | extraplugins/layers/org.eclipse.papyrus.layers.runtime/src/org/eclipse/papyrus/layers/runtime/Activator.java | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/extraplugins/layers/org.eclipse.papyrus.layers.runtime/src/org/eclipse/papyrus/layers/runtime/Activator.java b/extraplugins/layers/org.eclipse.papyrus.layers.runtime/src/org/eclipse/papyrus/layers/runtime/Activator.java new file mode 100644 index 00000000000..592e759c30c --- /dev/null +++ b/extraplugins/layers/org.eclipse.papyrus.layers.runtime/src/org/eclipse/papyrus/layers/runtime/Activator.java @@ -0,0 +1,46 @@ +/******************************************************************************* + * Copyright (c) 2013 CEA LIST. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Cedric Dumoulin - cedric.dumoulin@lifl.fr + ******************************************************************************/ +package org.eclipse.papyrus.layers.runtime; + +import org.eclipse.core.runtime.Plugin; +import org.eclipse.papyrus.infra.core.log.LogHelper; +import org.osgi.framework.BundleContext; + +public class Activator extends Plugin { + + private static BundleContext context; + + /** Logging helper */ + public static LogHelper log; + + static BundleContext getContext() { + return context; + } + + /* + * (non-Javadoc) + * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext bundleContext) throws Exception { + Activator.context = bundleContext; + // register the login helper + log = new LogHelper(this); + } + + /* + * (non-Javadoc) + * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext bundleContext) throws Exception { + Activator.context = null; + } + +} |