Bug 304077 [Metadata] Patch to update to new p2 API
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ConfigurationLogUpdateSection.java
for (Iterator iter = result.iterator(); iter.hasNext();) {
				IInstallableUnit unit = (IInstallableUnit) iter.next();
				sorted.add(NLS.bind(IDEWorkbenchMessages.ConfigurationLogUpdateSection_IU, unit.getId(), unit.getVersion()));
			}
			if (!sorted.isEmpty()) {
				writer.println(IDEWorkbenchMessages.ConfigurationLogUpdateSection_IUHeader);
				writer.println();
				for (Iterator iter = sorted.iterator(); iter.hasNext();)
					writer.println(iter.next());
			}
		} finally {
			context.ungetService(reference);
		}
	}
	/*
	 * Query OSGi and print out the list of known bundles.
	 */
	private void writeBundles(PrintWriter writer) {
		BundleContext context = IDEWorkbenchPlugin.getDefault().getBundle().getBundleContext();
		if (context == null)
			return;
		ServiceReference reference = context.getServiceReference(PlatformAdmin.class.getName());
		if (reference == null)
			return;
		PlatformAdmin admin = (PlatformAdmin) context.getService(reference);
		try {
			State state = admin.getState(false);
			BundleDescription[] bundles = state.getBundles();