Bug 549857 - Remove activator from org.eclipse.e4.tools.bundle.spy

Change-Id: I31048e4ca353650eb0a0e7f31771ebdbf307d520
Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
diff --git a/bundles/org.eclipse.e4.tools.bundle.spy/META-INF/MANIFEST.MF b/bundles/org.eclipse.e4.tools.bundle.spy/META-INF/MANIFEST.MF
index ed74a24..d507d7a 100644
--- a/bundles/org.eclipse.e4.tools.bundle.spy/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.e4.tools.bundle.spy/META-INF/MANIFEST.MF
@@ -13,7 +13,6 @@
  org.eclipse.e4.core.services,
  org.eclipse.e4.tools.spy;bundle-version="0.1.0"
 Export-Package: org.eclipse.e4.tools.bundles.spy
-Bundle-Activator: org.eclipse.e4.tools.bundles.spy.BundleSpyActivator
 Bundle-ActivationPolicy: lazy
 Import-Package: javax.annotation;version="1.2.0",
  javax.inject;version="1.0.0"
diff --git a/bundles/org.eclipse.e4.tools.bundle.spy/src/org/eclipse/e4/tools/bundles/spy/BundleSpyActivator.java b/bundles/org.eclipse.e4.tools.bundle.spy/src/org/eclipse/e4/tools/bundles/spy/BundleSpyActivator.java
deleted file mode 100644
index 460d4f5..0000000
--- a/bundles/org.eclipse.e4.tools.bundle.spy/src/org/eclipse/e4/tools/bundles/spy/BundleSpyActivator.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2015 OPCoach.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- *     Olivier Prouvost <olivier.prouvost@opcoach.com> - initial API and implementation (bug #451116)
- *******************************************************************************/
-package org.eclipse.e4.tools.bundles.spy;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-/**
- * Activator of this bundle to be sure to have an bundle context (see
- * BundleSpyPart)
- */
-public class BundleSpyActivator implements BundleActivator {
-
-	private static BundleContext bContext;
-
-	public static BundleContext getContext() {
-		return bContext;
-	}
-
-	@Override
-	public void start(BundleContext context) throws Exception {
-		bContext = context;
-	}
-
-	@Override
-	public void stop(BundleContext context) throws Exception {
-		bContext = null;
-
-	}
-
-}
diff --git a/bundles/org.eclipse.e4.tools.bundle.spy/src/org/eclipse/e4/tools/bundles/spy/BundleSpyPart.java b/bundles/org.eclipse.e4.tools.bundle.spy/src/org/eclipse/e4/tools/bundles/spy/BundleSpyPart.java
index b6330cc..fb625a5 100644
--- a/bundles/org.eclipse.e4.tools.bundle.spy/src/org/eclipse/e4/tools/bundles/spy/BundleSpyPart.java
+++ b/bundles/org.eclipse.e4.tools.bundle.spy/src/org/eclipse/e4/tools/bundles/spy/BundleSpyPart.java
@@ -215,7 +215,7 @@
 		bundlesTableViewer.setContentProvider(ArrayContentProvider.getInstance());
 
 		// Get the list of bundles in platform using bundle context...
-		BundleContext bc = BundleSpyActivator.getContext();
+		BundleContext bc = FrameworkUtil.getBundle(BundleSpyPart.class).getBundleContext();
 		bundlesTableViewer.setInput(bc.getBundles());
 
 		bundlesTableViewer.addSelectionChangedListener(new ISelectionChangedListener() {