Fix for Bug 5438: "TVT1: Hardcoded strings Script Preference page"
diff --git a/bundles/org.eclipse.core.boot/src/org/eclipse/core/internal/boot/DelegatingURLClassLoader.java b/bundles/org.eclipse.core.boot/src/org/eclipse/core/internal/boot/DelegatingURLClassLoader.java
index a3bf49b..0f8ad28 100644
--- a/bundles/org.eclipse.core.boot/src/org/eclipse/core/internal/boot/DelegatingURLClassLoader.java
+++ b/bundles/org.eclipse.core.boot/src/org/eclipse/core/internal/boot/DelegatingURLClassLoader.java
@@ -154,6 +154,43 @@
 }

 

 /**

+ * This method is to be used internally only for adding the proper class path and resource path

+ * entries to the class loaders for Runtime and Xerces. They are special cases since they need

+ * to be brought up before everything else. (and before the registry is loaded)

+ */

+public void addURLs(URL[] codePath, URLContentFilter[] codeFilters, URL[] resourcePath, URLContentFilter[] resourceFilters) {

+	Set keys = filterTable.keySet();

+

+	codePath = mungeJarURLs(codePath);

+	resourcePath = mungeJarURLs(resourcePath);

+	if (resourcePath != null && resourcePath.length > 0)

+		resourceLoader = new ResourceLoader(resourcePath);

+

+	if (codePath != null) {

+		if (codeFilters == null || codeFilters.length != codePath.length)

+			throw new DelegatingLoaderException();

+		setHotSwapPath(this, codePath);

+		for (int i=0; i<codePath.length; i++) {

+			URL path = codePath[i];

+			if (!keys.contains(path)) {

+				addURL(path);

+				filterTable.put(path, codeFilters[i]);

+			}

+		}

+	}

+	

+	if (resourcePath != null) {

+		if (resourceFilters == null || resourceFilters.length != resourcePath.length)

+			throw new DelegatingLoaderException();

+		for (int i = 0; i < resourcePath.length; i++) {

+			URL path = resourcePath[i];

+			if (resourceFilters[i] != null && !keys.contains(path))

+				filterTable.put(path, resourceFilters[i]);

+		}

+	}

+}

+

+/**

  * strip-off jar: protocol

  */ 

 private static URL mungeJarURL(URL url) {

diff --git a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/plugins/PluginDescriptor.java b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/plugins/PluginDescriptor.java
index fd7b815..2e938c0 100644
--- a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/plugins/PluginDescriptor.java
+++ b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/plugins/PluginDescriptor.java
Binary files differ
diff --git a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/InternalPlatform.java b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/InternalPlatform.java
index 14b0091..c4adb5f 100644
--- a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/InternalPlatform.java
+++ b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/InternalPlatform.java
@@ -97,10 +97,13 @@
 	// for now, simply do the default activation.  This does not do the right thing

 	// wrt the plugin class loader.

 	PluginDescriptor descriptor = (PluginDescriptor) registry.getPluginDescriptor(Platform.PI_RUNTIME);

-	descriptor.setPluginClassLoader(PlatformClassLoader.getDefault());

+	DelegatingURLClassLoader loader = PlatformClassLoader.getDefault();

+	descriptor.activateDefaultPlugins(loader);

+	descriptor.setPluginClassLoader(loader);

 	descriptor.getPlugin();

 

 	descriptor = (PluginDescriptor) registry.getPluginDescriptor(PI_XML);

+	descriptor.activateDefaultPlugins(xmlClassLoader);

 	descriptor.setPluginClassLoader(xmlClassLoader);

 	xmlClassLoader.setPluginDescriptor(descriptor);

 	descriptor.getPlugin();