Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2019-08-07 14:34:27 -0400
committerLars Vogel2019-08-07 14:34:27 -0400
commit561ee2ea13e4dd0a771d92095874c76dedee248d (patch)
treea8009dfe99dfff82750362118ea31992cd02343b
parent0e5a38373247bc1929620e2d9c60baf27a4e9972 (diff)
downloadorg.eclipse.e4.tools-561ee2ea13e4dd0a771d92095874c76dedee248d.tar.gz
org.eclipse.e4.tools-561ee2ea13e4dd0a771d92095874c76dedee248d.tar.xz
org.eclipse.e4.tools-561ee2ea13e4dd0a771d92095874c76dedee248d.zip
Bug 549857 - Remove activator from org.eclipse.e4.tools.bundle.spy
Change-Id: I31048e4ca353650eb0a0e7f31771ebdbf307d520 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r--bundles/org.eclipse.e4.tools.bundle.spy/META-INF/MANIFEST.MF1
-rw-r--r--bundles/org.eclipse.e4.tools.bundle.spy/src/org/eclipse/e4/tools/bundles/spy/BundleSpyActivator.java42
-rw-r--r--bundles/org.eclipse.e4.tools.bundle.spy/src/org/eclipse/e4/tools/bundles/spy/BundleSpyPart.java2
3 files changed, 1 insertions, 44 deletions
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 ed74a247..d507d7ae 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 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.10.0",
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 460d4f59..00000000
--- 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 b6330cc3..fb625a58 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 @@ public class BundleSpyPart {
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() {

Back to the top