/*******************************************************************************
 * Copyright (c) 2009 itemis AG (http://www.itemis.eu) 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
 * http://www.eclipse.org/legal/epl-v10.html
 *******************************************************************************/
package org.eclipse.xtext.internal;

import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Plugin;
import org.osgi.framework.BundleContext;

/**
 * @author Sven Efftinge - Initial contribution and API
 */
public class Activator extends Plugin {
	@Override
	public void start(BundleContext context) throws Exception {
		super.start(context);
		initializeResourceServiceProviderRegistry(context);
	}

	private void initializeResourceServiceProviderRegistry(BundleContext context) {
		IExtensionRegistry eReg = Platform.getExtensionRegistry();
		String symbolicName = context.getBundle().getSymbolicName();
		new ContentResourceServiceProviderRegistryReader(eReg, symbolicName).readRegistry();
		new ExtensionResourceServiceProviderRegistryReader(eReg, symbolicName).readRegistry();
		new ProtocolResourceServiceProviderRegistryReader(eReg, symbolicName).readRegistry();
	}

}

@@ -623,27 +623,71 @@
 pse.
-core.runtime.Plugin
+emf.common.EMFPlugin;%0Aimport org.osgi.framework.BundleActivator
 ;%0Aim
@@ -817,35 +817,38 @@
 tor 
-extends Plugin %7B%0A%09@Override
+implements BundleActivator %7B%0A%09
 %0A%09pu
@@ -911,30 +911,45 @@
 %7B%0A%09%09
-super.start(context);%0A
+if (EMFPlugin.IS_ECLIPSE_RUNNING) %7B%0A%09
 %09%09in
@@ -998,16 +998,20 @@
 ntext);%0A
+%09%09%7D%0A
 %09%7D%0A%0A%09pri
@@ -1479,10 +1479,74 @@
 ();%0A%09%7D%0A%0A
+%09public void stop(BundleContext context) throws Exception %7B%0A%09%7D%0A%0A
 %7D%0A

make Xtext runtime bundle work in non-equinox OSGi containers (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=434490)