diff options
author | Alexander Kurtakov | 2018-04-25 13:43:00 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2018-04-25 13:43:00 +0000 |
commit | d845db730981824a66af2e524ec44e6a09ba4dc6 (patch) | |
tree | 9fbe2fb46f6b5b731a12d463394ef6d98b26965a | |
parent | b79089e44d71e2e837f2b119f1c297f28681e487 (diff) | |
download | rt.equinox.p2-d845db730981824a66af2e524ec44e6a09ba4dc6.tar.gz rt.equinox.p2-d845db730981824a66af2e524ec44e6a09ba4dc6.tar.xz rt.equinox.p2-d845db730981824a66af2e524ec44e6a09ba4dc6.zip |
Remove unused method.
That causes import of deprecated PackageAdmin.
Change-Id: Idb36c049f672d9b8cb17f1fe818c73372133fc4b
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r-- | bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIActivator.java | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIActivator.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIActivator.java index 75db25ddd..71a10ce15 100644 --- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIActivator.java +++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIActivator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2015 IBM Corporation and others. + * Copyright (c) 2007, 2018 IBM Corporation and others. * 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 @@ -23,8 +23,7 @@ import org.eclipse.equinox.p2.ui.*; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.resource.ImageRegistry; import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.osgi.framework.*; -import org.osgi.service.packageadmin.PackageAdmin; +import org.osgi.framework.BundleContext; /** * Controls the lifecycle of the provisioning UI bundle @@ -33,8 +32,6 @@ import org.osgi.service.packageadmin.PackageAdmin; */ public class ProvUIActivator extends AbstractUIPlugin { private static BundleContext context; - private static PackageAdmin packageAdmin = null; - private static ServiceReference<PackageAdmin> packageAdminRef = null; private static ProvUIActivator plugin; public static final String PLUGIN_ID = "org.eclipse.equinox.p2.ui"; //$NON-NLS-1$ @@ -54,38 +51,16 @@ public class ProvUIActivator extends AbstractUIPlugin { return plugin; } - public static Bundle getBundle(String symbolicName) { - if (packageAdmin == null) - return null; - Bundle[] bundles = packageAdmin.getBundles(symbolicName, null); - if (bundles == null) - return null; - // Return the first bundle that is not installed or uninstalled - for (int i = 0; i < bundles.length; i++) { - if ((bundles[i].getState() & (Bundle.INSTALLED | Bundle.UNINSTALLED)) == 0) { - return bundles[i]; - } - } - return null; - } - public ProvUIActivator() { // do nothing } - /* - * (non-Javadoc) - * - * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) - */ @Override public void start(BundleContext bundleContext) throws Exception { super.start(bundleContext); plugin = this; ProvUIActivator.context = bundleContext; - packageAdminRef = bundleContext.getServiceReference(PackageAdmin.class); - packageAdmin = bundleContext.getService(packageAdminRef); } @Override |