org.eclipse.core.tests.harness
Class BundleTestingHelper

java.lang.Object
  extended by org.eclipse.core.tests.harness.BundleTestingHelper

public class BundleTestingHelper
extends java.lang.Object


Constructor Summary
BundleTestingHelper()
           
 
Method Summary
static org.osgi.framework.Bundle[] getBundles(org.osgi.framework.BundleContext context, java.lang.String symbolicName, java.lang.String version)
           
static org.osgi.framework.Bundle installBundle(org.osgi.framework.BundleContext context, java.lang.String location)
          Deprecated.  
static org.osgi.framework.Bundle installBundle(java.lang.String tag, org.osgi.framework.BundleContext context, java.lang.String location)
           
static void refreshPackages(org.osgi.framework.BundleContext context, org.osgi.framework.Bundle[] bundles)
          Do PackageAdmin.refreshPackages() in a synchronous way.
static void resolveBundles(org.osgi.framework.BundleContext context, org.osgi.framework.Bundle[] bundles)
           
static void runWithBundles(java.lang.String tag, java.lang.Runnable runnable, org.osgi.framework.BundleContext context, java.lang.String[] locations, TestRegistryChangeListener listener)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BundleTestingHelper

public BundleTestingHelper()
Method Detail

getBundles

public static org.osgi.framework.Bundle[] getBundles(org.osgi.framework.BundleContext context,
                                                     java.lang.String symbolicName,
                                                     java.lang.String version)

installBundle

public static org.osgi.framework.Bundle installBundle(org.osgi.framework.BundleContext context,
                                                      java.lang.String location)
                                               throws org.osgi.framework.BundleException,
                                                      java.net.MalformedURLException,
                                                      java.io.IOException
Deprecated. 

Throws:
org.osgi.framework.BundleException
java.net.MalformedURLException
java.io.IOException

installBundle

public static org.osgi.framework.Bundle installBundle(java.lang.String tag,
                                                      org.osgi.framework.BundleContext context,
                                                      java.lang.String location)
                                               throws org.osgi.framework.BundleException,
                                                      java.net.MalformedURLException,
                                                      java.io.IOException
Throws:
org.osgi.framework.BundleException
java.net.MalformedURLException
java.io.IOException

refreshPackages

public static void refreshPackages(org.osgi.framework.BundleContext context,
                                   org.osgi.framework.Bundle[] bundles)
Do PackageAdmin.refreshPackages() in a synchronous way. After installing all the requested bundles we need to do a refresh and want to ensure that everything is done before returning.

Parameters:
bundles - TODO remove this since all we wanted was to resolve bundles, what is done by #resolveBundles in this class

resolveBundles

public static void resolveBundles(org.osgi.framework.BundleContext context,
                                  org.osgi.framework.Bundle[] bundles)

runWithBundles

public static void runWithBundles(java.lang.String tag,
                                  java.lang.Runnable runnable,
                                  org.osgi.framework.BundleContext context,
                                  java.lang.String[] locations,
                                  TestRegistryChangeListener listener)