diff options
author | Oleg Besedin | 2009-03-02 21:00:27 +0000 |
---|---|---|
committer | Oleg Besedin | 2009-03-02 21:00:27 +0000 |
commit | 6b601aee29ac5c483275b2e729d769316812ea08 (patch) | |
tree | adcf0e15d189b736828b757fab21571919af2ae3 | |
parent | cf646c32024d882c21832adf992ed34cd87f14c8 (diff) | |
download | rt.equinox.bundles-6b601aee29ac5c483275b2e729d769316812ea08.tar.gz rt.equinox.bundles-6b601aee29ac5c483275b2e729d769316812ea08.tar.xz rt.equinox.bundles-6b601aee29ac5c483275b2e729d769316812ea08.zip |
Bug 266406 [registry] Warning for fragment contributions to non-singleton bundlev20090302-1745
3 files changed, 7 insertions, 5 deletions
diff --git a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/RegistryMessages.java b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/RegistryMessages.java index 8ada70375..ff1bdf826 100644 --- a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/RegistryMessages.java +++ b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/RegistryMessages.java @@ -50,6 +50,7 @@ public class RegistryMessages extends NLS { public static String parse_process; public static String parse_failedParsingManifest; public static String parse_nonSingleton; + public static String parse_nonSingletonFragment; public static String parse_problems; public static String parse_duplicateExtension; public static String parse_duplicateExtensionPoint; diff --git a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/messages.properties b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/messages.properties index a3c1a3cbd..8dc89ef61 100644 --- a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/messages.properties +++ b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/messages.properties @@ -39,6 +39,7 @@ parse_xmlParserNotAvailable=Could not acquire XML parsing service. parse_process = Processing XML extension registry contribution parse_failedParsingManifest = Could not parse XML contribution for \"{0}\". Any contributed extensions and extension points will be ignored. parse_nonSingleton = The extensions and extension-points from the bundle \"{0}\" are ignored. The bundle is not marked as singleton. +parse_nonSingletonFragment = The extensions and extension-points from the bundle \"{0}\" are ignored. The host bundle \"{1}\" is not marked as singleton. parse_problems = Problems parsing plug-in manifest for: \"{0}\". parse_duplicateExtension = Extensions supplied by \"{0}\" and \"{1}\" have the same Id: \"{2}\". parse_duplicateExtensionPoint = Ignored duplicate extension point \"{0}\" supplied by \"{1}\". diff --git a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/osgi/EclipseBundleListener.java b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/osgi/EclipseBundleListener.java index 4e8d3bc94..0a9138123 100644 --- a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/osgi/EclipseBundleListener.java +++ b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/osgi/EclipseBundleListener.java @@ -124,8 +124,8 @@ public class EclipseBundleListener implements SynchronousBundleListener { // If the bundle is not a singleton, then it is not added if (!isSingleton(bundle)) { if (report) { - String message = NLS.bind(RegistryMessages.parse_nonSingleton, bundle.getLocation()); - RuntimeLog.log(new Status(IStatus.INFO, RegistryMessages.OWNER_NAME, 0, message, null)); + String message = NLS.bind(RegistryMessages.parse_nonSingleton, bundle.getSymbolicName()); + RuntimeLog.log(new Status(IStatus.WARNING, RegistryMessages.OWNER_NAME, 0, message, null)); } return null; } @@ -141,8 +141,8 @@ public class EclipseBundleListener implements SynchronousBundleListener { return extensionURL; if (report) { - String message = NLS.bind(RegistryMessages.parse_nonSingleton, hosts[0].getLocation()); - RuntimeLog.log(new Status(IStatus.INFO, RegistryMessages.OWNER_NAME, 0, message, null)); + String message = NLS.bind(RegistryMessages.parse_nonSingletonFragment, bundle.getSymbolicName(), hosts[0].getSymbolicName()); + RuntimeLog.log(new Status(IStatus.WARNING, RegistryMessages.OWNER_NAME, 0, message, null)); } return null; } @@ -155,7 +155,7 @@ public class EclipseBundleListener implements SynchronousBundleListener { IContributor contributor = ContributorFactoryOSGi.createContributor(bundle); if (registry.hasContributor(contributor)) return; - URL pluginManifest = getExtensionURL(bundle, registry.debug()); + URL pluginManifest = getExtensionURL(bundle, true); if (pluginManifest == null) return; InputStream is; |