Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvlad2001-07-30 19:38:25 +0000
committervlad2001-07-30 19:38:25 +0000
commit5fd5c70cfc06b60c6e247a7079c2c4decbb7b223 (patch)
treea2c7c5b1c0f13490b24b441cd5f44894d57023b0
parent94faa8e811842e80d6b765bc69f2b13e862a38e0 (diff)
downloadeclipse.platform.runtime-5fd5c70cfc06b60c6e247a7079c2c4decbb7b223.tar.gz
eclipse.platform.runtime-5fd5c70cfc06b60c6e247a7079c2c4decbb7b223.tar.xz
eclipse.platform.runtime-5fd5c70cfc06b60c6e247a7079c2c4decbb7b223.zip
1GHOOPO: ITPCORE:WINNT - translated plugin.properties (R1.0 support)
-rw-r--r--bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/plugins/PluginDescriptor.java14
1 files changed, 12 insertions, 2 deletions
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 8c55af49e..7320ac44c 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
@@ -489,8 +489,18 @@ public ResourceBundle getResourceBundle(Locale targetLocale) throws MissingResou
if (bundleNotFound)
throw new MissingResourceException(Policy.bind("plugin.bundleNotFound", getId(), DEFAULT_BUNDLE_NAME + "_" + targetLocale), DEFAULT_BUNDLE_NAME + "_" + targetLocale, "");
- // try to load bundle from this plugin install directory
- ClassLoader resourceLoader = new URLClassLoader(new URL[] { getInstallURL()}, null);
+ // try to load bundle from this plugin. A new loader is created to include the base
+ // install directory on the search path (to maintain compatibility with current handling
+ // of plugin.properties bundles (not in code jar)).
+ URL[] cp = ((URLClassLoader)getPluginClassLoader()).getURLs();
+ URL[] newcp = new URL[cp.length+1];
+ for (int i=0; i<cp.length; i++) newcp[i+1] = cp[i];
+ try {
+ newcp[0] = Platform.resolve(getInstallURL()); // always try to resolve URLs used in loaders
+ } catch(IOException e) {
+ newcp[0] = getInstallURL();
+ }
+ ClassLoader resourceLoader = new URLClassLoader(newcp, null);
ResourceBundle newBundle = null;
try {
newBundle = ResourceBundle.getBundle(DEFAULT_BUNDLE_NAME, targetLocale, resourceLoader);

Back to the top