Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Arthorne2010-02-15 04:11:23 +0000
committerJohn Arthorne2010-02-15 04:11:23 +0000
commit1bedd453542f0c8171ad816e02276d13f0b5c47d (patch)
treed45425a83bdefd96dc6bcdd5d3e9b0da96c10c7c /bundles/org.eclipse.equinox.p2.repository.tools
parent8051305f54fdc87ee41ea38a287c3acf686150f6 (diff)
downloadrt.equinox.p2-1bedd453542f0c8171ad816e02276d13f0b5c47d.tar.gz
rt.equinox.p2-1bedd453542f0c8171ad816e02276d13f0b5c47d.tar.xz
rt.equinox.p2-1bedd453542f0c8171ad816e02276d13f0b5c47d.zip
Bug 225250 - Need to get rid of exemplary setup
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.repository.tools')
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Activator.java28
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Messages.java1
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/messages.properties1
3 files changed, 2 insertions, 28 deletions
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Activator.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Activator.java
index fc192eb8a..7d0c203ad 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Activator.java
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Activator.java
@@ -21,8 +21,8 @@ import org.eclipse.equinox.p2.engine.IProfileRegistry;
import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.*;
-import org.osgi.service.packageadmin.PackageAdmin;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
public class Activator implements BundleActivator {
@@ -41,12 +41,6 @@ public class Activator implements BundleActivator {
*/
public void start(BundleContext context) throws Exception {
bundleContext = context;
-
- // TODO needed to do this to ensure the profile registry was registered
- Bundle bundle = getBundle("org.eclipse.equinox.p2.exemplarysetup"); //$NON-NLS-1$
- if (bundle == null)
- throw new ProvisionException(Messages.unable_to_start_exemplarysetup);
- bundle.start(Bundle.START_TRANSIENT);
}
/* (non-Javadoc)
@@ -102,24 +96,6 @@ public class Activator implements BundleActivator {
}
/*
- * Return the bundle with the given symbolic name, or null if it cannot be found.
- */
- public static synchronized Bundle getBundle(String symbolicName) throws ProvisionException {
- PackageAdmin packageAdmin = (PackageAdmin) ServiceHelper.getService(getBundleContext(), PackageAdmin.class.getName());
- if (packageAdmin == null)
- throw new ProvisionException(Messages.no_package_admin);
- 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;
- }
-
- /*
* Return the metadata repository manager. Throw an exception if it cannot be obtained.
*/
public static IMetadataRepositoryManager getMetadataRepositoryManager() throws ProvisionException {
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Messages.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Messages.java
index 9021ef583..435ef2627 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Messages.java
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Messages.java
@@ -38,7 +38,6 @@ public class Messages extends NLS {
public static String no_profile_registry;
public static String no_provisioning_agent;
public static String unable_to_process_uri;
- public static String unable_to_start_exemplarysetup;
public static String unknown_repository_type;
public static String MirrorApplication_artifactDestinationNoSource;
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/messages.properties b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/messages.properties
index 4ed8a6556..61b0327af 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/messages.properties
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/messages.properties
@@ -26,7 +26,6 @@ no_package_admin=Unable to acquire package admin service.
no_profile_registry=Unable to acquire profile registry service.
no_provisioning_agent=Unable to acquire provisioning agent service.
unable_to_process_uri=Unable to process as URI: {0}
-unable_to_start_exemplarysetup=Unable to start exemplarysetup bundle.
unknown_repository_type=Repository is of an unknown type: {0}
skippingInvalidFilter=Invalid filter format, skipping {0}.

Back to the top