Bug 394739 - Remove org.eclipse.core.runtime.compatibility* bundles

Change-Id: Iacc036e92d43a5bca1a727f2dd203d1a39692f9a
Signed-off-by: Mat Booth <mat.booth@redhat.com>
diff --git a/examples/org.eclipse.compare.examples/META-INF/MANIFEST.MF b/examples/org.eclipse.compare.examples/META-INF/MANIFEST.MF
index 70c9503..de25d5a 100644
--- a/examples/org.eclipse.compare.examples/META-INF/MANIFEST.MF
+++ b/examples/org.eclipse.compare.examples/META-INF/MANIFEST.MF
@@ -3,7 +3,6 @@
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.compare.examples; singleton:=true
 Bundle-Version: 3.1.400.qualifier
-Bundle-Activator: org.eclipse.core.internal.compatibility.PluginActivator
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Export-Package: org.eclipse.compare.examples.structurecreator
@@ -11,6 +10,6 @@
  org.eclipse.core.resources,
  org.eclipse.compare,
  org.eclipse.jface.text,
- org.eclipse.core.runtime.compatibility
+ org.eclipse.core.runtime
 Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/examples/org.eclipse.team.examples.filesystem/META-INF/MANIFEST.MF b/examples/org.eclipse.team.examples.filesystem/META-INF/MANIFEST.MF
index 288a21f..8649ef5 100644
--- a/examples/org.eclipse.team.examples.filesystem/META-INF/MANIFEST.MF
+++ b/examples/org.eclipse.team.examples.filesystem/META-INF/MANIFEST.MF
@@ -3,7 +3,6 @@
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.team.examples.filesystem; singleton:=true
 Bundle-Version: 3.4.300.qualifier
-Bundle-Activator: org.eclipse.core.internal.compatibility.PluginActivator
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Export-Package: org.eclipse.team.examples.filesystem,
@@ -17,7 +16,7 @@
  org.eclipse.team.examples.model.ui.mapping,
  org.eclipse.team.examples.pessimistic,
  org.eclipse.team.examples.pessimistic.ui
-Require-Bundle: org.eclipse.core.runtime.compatibility,
+Require-Bundle: org.eclipse.core.runtime,
  org.eclipse.ui.ide;resolution:=optional,
  org.eclipse.ui.views;resolution:=optional,
  org.eclipse.jface.text;resolution:=optional,
@@ -31,5 +30,5 @@
  org.eclipse.core.filesystem,
  org.eclipse.ui.navigator
 Bundle-ActivationPolicy: lazy
-Plugin-Class: org.eclipse.team.examples.filesystem.FileSystemPlugin
+Bundle-Activator: org.eclipse.team.examples.filesystem.FileSystemPlugin
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemPlugin.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemPlugin.java
index 53b3c39..858c4b3 100644
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemPlugin.java
+++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemPlugin.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2015 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
@@ -51,15 +51,13 @@
 	
 	/**
 	 * Override the standard plugin constructor.
-	 * 
-	 * @param descriptor the plugin descriptor
 	 */
-	public FileSystemPlugin(IPluginDescriptor descriptor) {
-		super(descriptor);
+	public FileSystemPlugin() {
+		super();
 		// record this instance as the singleton
 		plugin = this;
 		// Instanctiate pessimistic provider
-		pessPlugin = new PessimisticFilesystemProviderPlugin(descriptor);
+		pessPlugin = new PessimisticFilesystemProviderPlugin();
 	}
 	
 	/**
@@ -120,7 +118,7 @@
 	public void start(BundleContext context) throws Exception {
 		super.start(context);
 		//Call startup on the Pessimistic Plugin
-		pessPlugin.startup();
+		pessPlugin.start(context);
 		tracker = new PluginManifestChangeTracker();
 		tracker.start();
 	}
@@ -128,7 +126,7 @@
 	public void stop(BundleContext context) throws Exception {
 		try {
 			if (pessPlugin != null)
-				pessPlugin.shutdown();
+				pessPlugin.stop(context);
 		} finally {
 			super.stop(context);
 		}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/PessimisticFilesystemProviderPlugin.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/PessimisticFilesystemProviderPlugin.java
index 4077298..91b8b39 100644
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/PessimisticFilesystemProviderPlugin.java
+++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/PessimisticFilesystemProviderPlugin.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2015 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
@@ -15,12 +15,10 @@
 import java.util.List;
 
 import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPluginDescriptor;
-import org.eclipse.core.runtime.Plugin;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
 
 /**
  * The plugin for the <code>PessimisticFilesystemProvider</code>.
@@ -52,8 +50,8 @@
 	/**
 	 * Constructor required by plugin lifecycle.
 	 */
-	public PessimisticFilesystemProviderPlugin(IPluginDescriptor pluginDescriptor) {
-		super(pluginDescriptor);
+	public PessimisticFilesystemProviderPlugin() {
+		super();
 		instance = this;
 		fListeners= new ArrayList(1);
 		//setDebugging(true);
@@ -103,25 +101,21 @@
 
 	/**
 	 * Starts the resource listener.
-	 * 
-	 * @see Plugin#startup()
 	 */
-	public void startup() throws CoreException {
+	public void start(BundleContext context) throws Exception {
 		fListener= new ResourceChangeListener();
 		fListener.startup();
 		initializeDefaultPreferences();
-		super.startup();
+		super.start(context);
 	}
 
 	/**
 	 * Stops the resource listener.
-	 * 
-	 * @see Plugin#startup()
 	 */
-	public void shutdown() throws CoreException {
+	public void stop(BundleContext context) throws Exception {
 		fListener.shutdown();
 		fListener= null;
-		super.shutdown();
+		super.stop(context);
 	}
 	
 	/**
@@ -161,4 +155,4 @@
 	public void removeProviderListener(IResourceStateListener listener) {
 		fListeners.remove(listener);
 	}
-}
\ No newline at end of file
+}
diff --git a/tests/org.eclipse.team.tests.core/META-INF/MANIFEST.MF b/tests/org.eclipse.team.tests.core/META-INF/MANIFEST.MF
index f7a9328..3891c3a 100644
--- a/tests/org.eclipse.team.tests.core/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.team.tests.core/META-INF/MANIFEST.MF
@@ -3,7 +3,6 @@
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.team.tests.core; singleton:=true
 Bundle-Version: 3.7.300.qualifier
-Bundle-Activator: org.eclipse.core.internal.compatibility.PluginActivator
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Export-Package: org.eclipse.team.tests.core,
@@ -18,7 +17,7 @@
  org.eclipse.ui.editors;resolution:=optional,
  org.eclipse.core.tests.harness,
  org.eclipse.core.resources,
- org.eclipse.core.runtime.compatibility,
+ org.eclipse.core.runtime,
  org.eclipse.team.core,
  org.eclipse.team.cvs.core,
  org.eclipse.team.ui,
diff --git a/tests/org.eclipse.team.tests.cvs.core/META-INF/MANIFEST.MF b/tests/org.eclipse.team.tests.cvs.core/META-INF/MANIFEST.MF
index 04ce570..5a2bdb0 100644
--- a/tests/org.eclipse.team.tests.cvs.core/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.team.tests.cvs.core/META-INF/MANIFEST.MF
@@ -23,7 +23,6 @@
  org.eclipse.ui.workbench.texteditor;resolution:=optional,
  org.eclipse.ui.editors;resolution:=optional,
  org.eclipse.core.tests.harness,
- org.eclipse.core.runtime.compatibility,
  org.eclipse.core.runtime,
  org.eclipse.core.resources,
  org.eclipse.team.core,
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/ModuleTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/ModuleTest.java
index 09b2629..4a81621 100644
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/ModuleTest.java
+++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/ModuleTest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2015 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
@@ -22,9 +22,8 @@
 import org.eclipse.core.resources.IWorkspaceRoot;
 import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.FileLocator;
 import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IPluginDescriptor;
-import org.eclipse.core.runtime.IPluginRegistry;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.team.core.TeamException;
@@ -33,8 +32,8 @@
 import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
 import org.eclipse.team.internal.ccvs.core.ICVSResource;
 import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.Session;
 import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
+import org.eclipse.team.internal.ccvs.core.client.Session;
 import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
 import org.eclipse.team.internal.ccvs.core.resources.RemoteFolder;
 import org.eclipse.team.internal.ccvs.core.resources.RemoteModule;
@@ -94,11 +93,9 @@
 	
 	protected void uploadProject(String projectName) throws TeamException, IOException, CoreException {
 		// locate the test case contents in the plugin resources
-		IPluginRegistry registry = Platform.getPluginRegistry();
-		IPluginDescriptor descriptor = registry.getPluginDescriptor("org.eclipse.team.tests.cvs.core");
-		URL baseURL = descriptor.getInstallURL();
-		URL url = new URL(baseURL, RESOURCE_PATH + projectName);
-		url = Platform.resolve(url);
+		Bundle bundle = Platform.getBundle("org.eclipse.team.tests.cvs.core");
+		URL url = bundle.getEntry(RESOURCE_PATH + projectName);
+		url = FileLocator.resolve(url);
 		Assert.assertTrue(url.getProtocol().equals("file"));
 		IPath path = new Path(url.getPath());