diff options
author | Thomas Watson | 2013-09-05 21:41:21 +0000 |
---|---|---|
committer | Thomas Watson | 2013-09-06 18:45:46 +0000 |
commit | 75092469f948217c94704f6cb298d81b75d9f9d6 (patch) | |
tree | 260bb433e66ddca77cbd23f01415d2c15488a3a5 | |
parent | ee16ee5520224d7e0604596c01d2737b25bd3449 (diff) | |
download | rt.equinox.framework-75092469f948217c94704f6cb298d81b75d9f9d6.tar.gz rt.equinox.framework-75092469f948217c94704f6cb298d81b75d9f9d6.tar.xz rt.equinox.framework-75092469f948217c94704f6cb298d81b75d9f9d6.zip |
Externalize Strings.I20130906-2000
24 files changed, 156 insertions, 77 deletions
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/core/runtime/adaptor/EclipseStarter.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/core/runtime/adaptor/EclipseStarter.java index 70ecc42aa..ddb3ca82b 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/core/runtime/adaptor/EclipseStarter.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/core/runtime/adaptor/EclipseStarter.java @@ -590,7 +590,7 @@ public class EclipseStarter { } Location installLocation = installLocRef == null ? null : context.getService(installLocRef.iterator().next()); if (installLocation == null) { - throw new IllegalStateException("No install location found."); + throw new IllegalStateException(Msg.EclipseStarter_InstallLocation); } for (int i = 0; i < installEntries.length; i++) { String name = installEntries[i]; diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/core/runtime/internal/adaptor/ConsoleManager.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/core/runtime/internal/adaptor/ConsoleManager.java index 44333b900..8dc026775 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/core/runtime/internal/adaptor/ConsoleManager.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/core/runtime/internal/adaptor/ConsoleManager.java @@ -12,7 +12,6 @@ package org.eclipse.core.runtime.internal.adaptor; import org.eclipse.osgi.internal.framework.EquinoxConfiguration; import org.osgi.framework.*; -import org.osgi.service.packageadmin.PackageAdmin; public class ConsoleManager { @@ -51,8 +50,8 @@ public class ConsoleManager { if ("none".equals(consolePort)) //$NON-NLS-1$ return; // otherwise we need to check for the equinox console bundle and start it - ServiceReference<PackageAdmin> paRef = context.getServiceReference(PackageAdmin.class); - PackageAdmin pa = paRef == null ? null : context.getService(paRef); + ServiceReference<org.osgi.service.packageadmin.PackageAdmin> paRef = context.getServiceReference(org.osgi.service.packageadmin.PackageAdmin.class); + org.osgi.service.packageadmin.PackageAdmin pa = paRef == null ? null : context.getService(paRef); Bundle[] consoles = pa.getBundles(consoleBundle, null); if (consoles == null || consoles.length == 0) { if (consolePort != null) diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/Module.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/Module.java index 9aa2d8674..32e53eb29 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/Module.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/Module.java @@ -15,6 +15,7 @@ import java.util.EnumSet; import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.ReentrantLock; import org.eclipse.osgi.container.ModuleContainerAdaptor.ModuleEvent; +import org.eclipse.osgi.internal.messages.Msg; import org.osgi.framework.*; import org.osgi.framework.startlevel.BundleStartLevel; import org.osgi.framework.wiring.BundleRevision; @@ -324,10 +325,10 @@ public abstract class Module implements BundleReference, BundleStartLevel, Compa return; } } - throw new BundleException("Unable to acquire the state change lock for the module: " + toString() + " " + transitionEvent + " " + stateTransitionEvents + (invalid ? " isInvalid" : ""), BundleException.STATECHANGE_ERROR); + throw new BundleException(Msg.Module_LockError + toString() + " " + transitionEvent + " " + stateTransitionEvents + (invalid ? " invalid" : ""), BundleException.STATECHANGE_ERROR); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ } catch (InterruptedException e) { Thread.currentThread().interrupt(); - throw new BundleException("Unable to acquire the state change lock for the module: " + toString() + " " + transitionEvent, BundleException.STATECHANGE_ERROR, e); + throw new BundleException(Msg.Module_LockError + toString() + " " + transitionEvent, BundleException.STATECHANGE_ERROR, e); //$NON-NLS-1$ } finally { if (previousInterruption) { Thread.currentThread().interrupt(); @@ -341,7 +342,7 @@ public abstract class Module implements BundleReference, BundleStartLevel, Compa */ protected final void unlockStateChange(ModuleEvent transitionEvent) { if (stateChangeLock.getHoldCount() == 0 || !stateTransitionEvents.contains(transitionEvent)) - throw new IllegalMonitorStateException("Current thread does not hold the state change lock for: " + transitionEvent); + throw new IllegalMonitorStateException("Current thread does not hold the state change lock for: " + transitionEvent); //$NON-NLS-1$ stateTransitionEvents.remove(transitionEvent); stateChangeLock.unlock(); } @@ -387,7 +388,7 @@ public abstract class Module implements BundleReference, BundleStartLevel, Compa persistStartOptions(options); if (getStartLevel() > getRevisions().getContainer().getStartLevel()) { if (StartOptions.TRANSIENT.isContained(options)) { - throw new BundleException("Cannot transiently start a module whose start level is not met.", BundleException.START_TRANSIENT_ERROR); + throw new BundleException(Msg.Module_Transient_StartError, BundleException.START_TRANSIENT_ERROR); } // DO nothing return; @@ -417,8 +418,8 @@ public abstract class Module implements BundleReference, BundleStartLevel, Compa if (State.ACTIVE.equals(getState())) return; if (getState().equals(State.INSTALLED)) { - String reportMessage = ModuleResolutionReport.getResolutionReport("", getCurrentRevision(), report.getEntries(), null); - throw new BundleException("Could not resolve module: " + reportMessage, BundleException.RESOLVE_ERROR, e); + String reportMessage = ModuleResolutionReport.getResolutionReport("", getCurrentRevision(), report.getEntries(), null); //$NON-NLS-1$ + throw new BundleException(Msg.Module_ResolveError + reportMessage, BundleException.RESOLVE_ERROR, e); } } @@ -440,7 +441,7 @@ public abstract class Module implements BundleReference, BundleStartLevel, Compa if (event != null) { if (!EnumSet.of(ModuleEvent.STARTED, ModuleEvent.LAZY_ACTIVATION, ModuleEvent.STOPPED).contains(event)) - throw new IllegalStateException("Wrong event type: " + event); + throw new IllegalStateException("Wrong event type: " + event); //$NON-NLS-1$ publishEvent(event); } @@ -484,7 +485,7 @@ public abstract class Module implements BundleReference, BundleStartLevel, Compa if (event != null) { if (!ModuleEvent.STOPPED.equals(event)) - throw new IllegalStateException("Wrong event type: " + event); + throw new IllegalStateException("Wrong event type: " + event); //$NON-NLS-1$ publishEvent(event); } if (stopError != null) @@ -494,7 +495,7 @@ public abstract class Module implements BundleReference, BundleStartLevel, Compa private void checkFragment() throws BundleException { ModuleRevision current = getCurrentRevision(); if ((current.getTypes() & BundleRevision.TYPE_FRAGMENT) != 0) { - throw new BundleException("Invalid operation on a fragment.", BundleException.INVALID_OPERATION); + throw new BundleException(Msg.Module_Fragment_InvalidOperation, BundleException.INVALID_OPERATION); } } @@ -510,7 +511,7 @@ public abstract class Module implements BundleReference, BundleStartLevel, Compa final void checkValid() { if (getState().equals(State.UNINSTALLED)) - throw new IllegalStateException("Module has been uninstalled."); + throw new IllegalStateException(Msg.Module_UninstalledError); } private ModuleEvent doStart(StartOptions... options) throws BundleException { @@ -561,7 +562,7 @@ public abstract class Module implements BundleReference, BundleStartLevel, Compa publishEvent(ModuleEvent.STOPPING); if (t instanceof BundleException) throw (BundleException) t; - throw new BundleException("Error starting module.", BundleException.ACTIVATOR_ERROR, t); + throw new BundleException(Msg.Module_StartError, BundleException.ACTIVATOR_ERROR, t); } } @@ -612,7 +613,7 @@ public abstract class Module implements BundleReference, BundleStartLevel, Compa } catch (Throwable t) { if (t instanceof BundleException) throw (BundleException) t; - throw new BundleException("Error stopping module.", BundleException.ACTIVATOR_ERROR, t); + throw new BundleException(Msg.Module_StopError, BundleException.ACTIVATOR_ERROR, t); } finally { // must always set the state to stopped setState(State.RESOLVED); diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleContainer.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleContainer.java index b95c7d54b..320efcab3 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleContainer.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleContainer.java @@ -27,7 +27,9 @@ import org.eclipse.osgi.framework.eventmgr.*; import org.eclipse.osgi.framework.util.SecureAction; import org.eclipse.osgi.internal.container.InternalUtils; import org.eclipse.osgi.internal.container.LockSet; +import org.eclipse.osgi.internal.messages.Msg; import org.eclipse.osgi.report.resolution.ResolutionReport.Entry; +import org.eclipse.osgi.util.NLS; import org.osgi.framework.*; import org.osgi.framework.namespace.*; import org.osgi.framework.startlevel.FrameworkStartLevel; @@ -170,14 +172,14 @@ public final class ModuleContainer { locationLocked = locationLocks.tryLock(location, 5, TimeUnit.SECONDS); nameLocked = name != null && nameLocks.tryLock(name, 5, TimeUnit.SECONDS); if (!locationLocked) { - throw new BundleException("Failed to obtain location lock for installation: " + location, BundleException.STATECHANGE_ERROR); + throw new BundleException("Failed to obtain location lock for installation: " + location, BundleException.STATECHANGE_ERROR); //$NON-NLS-1$ } if (name != null && !nameLocked) { - throw new BundleException("Failed to obtain symbolic name lock for installation: " + name, BundleException.STATECHANGE_ERROR); + throw new BundleException("Failed to obtain symbolic name lock for installation: " + name, BundleException.STATECHANGE_ERROR); //$NON-NLS-1$ } } catch (InterruptedException e) { Thread.currentThread().interrupt(); - throw new BundleException("Failed to obtain id locks for installation.", BundleException.STATECHANGE_ERROR, e); + throw new BundleException("Failed to obtain id locks for installation.", BundleException.STATECHANGE_ERROR, e); //$NON-NLS-1$ } Module existingLocation = null; @@ -211,7 +213,7 @@ public final class ModuleContainer { BundleContext context = bundle == null ? null : bundle.getBundleContext(); if (context != null && context.getBundle(existingLocation.getId()) == null) { Bundle b = existingLocation.getBundle(); - throw new BundleException("Bundle \"" + b.getSymbolicName() + "\" version \"" + b.getVersion() + "\" is already installed at location: " + location, BundleException.REJECTED_BY_HOOK); + throw new BundleException(NLS.bind(Msg.ModuleContainer_NameCollisionWithLocation, new Object[] {b.getSymbolicName(), b.getVersion(), location}), BundleException.REJECTED_BY_HOOK); } } return existingLocation; @@ -222,7 +224,7 @@ public final class ModuleContainer { adaptor.getModuleCollisionHook().filterCollisions(ModuleCollisionHook.INSTALLING, origin, collisionCandidates); } if (!collisionCandidates.isEmpty()) { - throw new BundleException("A bundle is already installed with name \"" + name + "\" and version \"" + builder.getVersion(), BundleException.DUPLICATE_BUNDLE_ERROR); + throw new BundleException(NLS.bind(Msg.ModuleContainer_NameCollision, name, builder.getVersion()), BundleException.DUPLICATE_BUNDLE_ERROR); } Module result = moduleDatabase.install(location, builder, revisionInfo); @@ -256,11 +258,11 @@ public final class ModuleContainer { // Attempt to lock the name try { if (name != null && !(nameLocked = nameLocks.tryLock(name, 5, TimeUnit.SECONDS))) { - throw new BundleException("Failed to obtain id locks for installation.", BundleException.STATECHANGE_ERROR); + throw new BundleException("Failed to obtain id locks for installation.", BundleException.STATECHANGE_ERROR); //$NON-NLS-1$ } } catch (InterruptedException e) { Thread.currentThread().interrupt(); - throw new BundleException("Failed to obtain id locks for installation.", BundleException.STATECHANGE_ERROR, e); + throw new BundleException("Failed to obtain id locks for installation.", BundleException.STATECHANGE_ERROR, e); //$NON-NLS-1$ } Collection<Module> collisionCandidates = Collections.emptyList(); @@ -295,7 +297,7 @@ public final class ModuleContainer { } if (!collisionCandidates.isEmpty()) { - throw new BundleException("A bundle is already installed with name \"" + name + "\" and version \"" + builder.getVersion(), BundleException.DUPLICATE_BUNDLE_ERROR); + throw new BundleException(NLS.bind(Msg.ModuleContainer_NameCollision, name, builder.getVersion()), BundleException.DUPLICATE_BUNDLE_ERROR); } module.lockStateChange(ModuleEvent.UPDATED); @@ -399,7 +401,7 @@ public final class ModuleContainer { private ModuleResolutionReport resolve(Collection<Module> triggers, boolean triggersMandatory, boolean restartTriggers) { if (isRefreshingSystemModule()) { - return new ModuleResolutionReport(null, Collections.<Resource, List<Entry>> emptyMap(), new ResolutionException("Unable to resolve while shutting down the framework.")); + return new ModuleResolutionReport(null, Collections.<Resource, List<Entry>> emptyMap(), new ResolutionException("Unable to resolve while shutting down the framework.")); //$NON-NLS-1$ } ModuleResolutionReport report = null; do { @@ -564,7 +566,7 @@ public final class ModuleContainer { modulesLocked.add(module); } catch (BundleException e) { // TODO throw some appropriate exception - throw new IllegalStateException("Could not acquire state change lock.", e); + throw new IllegalStateException(Msg.ModuleContainer_StateLockError, e); } } Map<ModuleRevision, ModuleWiring> wiringCopy = moduleDatabase.getWiringsCopy(); @@ -749,7 +751,7 @@ public final class ModuleContainer { } } catch (BundleException e) { // TODO throw some appropriate exception - throw new IllegalStateException("Could not acquire state change lock.", e); + throw new IllegalStateException(Msg.ModuleContainer_StateLockError, e); } finally { moduleDatabase.writeUnlock(); } @@ -773,7 +775,7 @@ public final class ModuleContainer { // do a sanity check on states of the modules, they must be INSTALLED, RESOLVED or UNINSTALLED for (Module module : modulesLocked) { if (Module.ACTIVE_SET.contains(module.getState())) { - throw new IllegalStateException("Module is in the wrong state: " + module + ": " + module.getState()); + throw new IllegalStateException("Module is in the wrong state: " + module + ": " + module.getState()); //$NON-NLS-1$ //$NON-NLS-2$ } } @@ -1307,10 +1309,10 @@ public final class ModuleContainer { void setStartLevel(Module module, int startlevel) { checkAdminPermission(module.getBundle(), AdminPermission.EXECUTE); if (module.getId() == 0) { - throw new IllegalArgumentException("Cannot set the start level of the system bundle."); + throw new IllegalArgumentException(Msg.ModuleContainer_SystemStartLevelError); } if (startlevel < 1) { - throw new IllegalArgumentException("Cannot set the start level to less than 1: " + startlevel); + throw new IllegalArgumentException(Msg.ModuleContainer_NegativeStartLevelError + startlevel); } if (module.getStartLevel() == startlevel) { return; // do nothing @@ -1331,11 +1333,11 @@ public final class ModuleContainer { public void setStartLevel(int startlevel, FrameworkListener... listeners) { checkAdminPermission(getBundle(), AdminPermission.STARTLEVEL); if (startlevel < 1) { - throw new IllegalArgumentException("Cannot set the start level to less than 1: " + startlevel); + throw new IllegalArgumentException(Msg.ModuleContainer_NegativeStartLevelError + startlevel); } if (activeStartLevel.get() == 0) { - throw new IllegalStateException("The system has not be activated yet."); + throw new IllegalStateException(Msg.ModuleContainer_SystemNotActiveError); } // queue start level operation in the background // notice that we only do one start level operation at a time @@ -1357,7 +1359,7 @@ public final class ModuleContainer { public void setInitialBundleStartLevel(int startlevel) { checkAdminPermission(getBundle(), AdminPermission.STARTLEVEL); if (startlevel < 1) { - throw new IllegalArgumentException("Cannot set the start level to less than 1: " + startlevel); + throw new IllegalArgumentException(Msg.ModuleContainer_NegativeStartLevelError + startlevel); } moduleDatabase.setInitialModuleStartLevel(startlevel); } diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleContainerAdaptor.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleContainerAdaptor.java index b00f6ad70..c0f3b837f 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleContainerAdaptor.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleContainerAdaptor.java @@ -136,7 +136,7 @@ public abstract class ModuleContainerAdaptor { * @return a new {@link ModuleLoader} for the specified wiring. */ public ModuleLoader createModuleLoader(ModuleWiring wiring) { - throw new UnsupportedOperationException("Container adaptor does not support module class loaders."); + throw new UnsupportedOperationException("Container adaptor does not support module class loaders."); //$NON-NLS-1$ } /** diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleDatabase.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleDatabase.java index eea2f234d..3ac8ec586 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleDatabase.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleDatabase.java @@ -651,7 +651,7 @@ public class ModuleDatabase { private void checkWrite() { if (monitor.getWriteHoldCount() == 0) - throw new IllegalMonitorStateException("Must hold the write lock."); + throw new IllegalMonitorStateException("Must hold the write lock."); //$NON-NLS-1$ } /** diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleRequirement.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleRequirement.java index 3bec2d4ec..c46e5ba66 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleRequirement.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleRequirement.java @@ -85,7 +85,7 @@ public class ModuleRequirement implements BundleRequirement { return namespace + ModuleRevision.toString(attributes, false) + ModuleRevision.toString(directives, true); } - private static final String PACKAGENAME_FILTER_COMPONENT = PackageNamespace.PACKAGE_NAMESPACE + "="; + private static final String PACKAGENAME_FILTER_COMPONENT = PackageNamespace.PACKAGE_NAMESPACE + "="; //$NON-NLS-1$ DynamicModuleRequirement getDynamicPackageRequirement(ModuleRevision host, String dynamicPkgName) { if (!PackageNamespace.PACKAGE_NAMESPACE.equals(namespace)) { @@ -110,10 +110,10 @@ public class ModuleRequirement implements BundleRequirement { } String filterPackageName = dynamicFilter.substring(packageNameBegin, packageNameEnd); String specificPackageFilter = null; - if ("*".equals(filterPackageName)) { + if ("*".equals(filterPackageName)) { //$NON-NLS-1$ // matches all specificPackageFilter = dynamicFilter.replace(PACKAGENAME_FILTER_COMPONENT + filterPackageName, PACKAGENAME_FILTER_COMPONENT + dynamicPkgName); - } else if (filterPackageName.endsWith(".*")) { + } else if (filterPackageName.endsWith(".*")) { //$NON-NLS-1$ if (dynamicPkgName.startsWith(filterPackageName.substring(0, filterPackageName.length() - 1))) { specificPackageFilter = dynamicFilter.replace(PACKAGENAME_FILTER_COMPONENT + filterPackageName, PACKAGENAME_FILTER_COMPONENT + dynamicPkgName); } diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleResolutionReport.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleResolutionReport.java index a221c08d7..a3e2a9f31 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleResolutionReport.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleResolutionReport.java @@ -11,6 +11,7 @@ package org.eclipse.osgi.container; import java.util.*; +import org.eclipse.osgi.internal.messages.Msg; import org.eclipse.osgi.report.resolution.ResolutionReport; import org.osgi.resource.*; import org.osgi.service.resolver.ResolutionException; @@ -94,7 +95,7 @@ public class ModuleResolutionReport implements ResolutionReport { List<ResolutionReport.Entry> revisionEntries = reportEntries.get(revision); if (revisionEntries == null) { - result.append(prepend).append(" ").append("No resolution report for the bundle."); //$NON-NLS-1$ + result.append(prepend).append(" ").append(Msg.ModuleResolutionReport_NoReport); //$NON-NLS-1$ } else { for (ResolutionReport.Entry entry : revisionEntries) { printResolutionEntry(result, prepend + " ", entry, reportEntries, visited); //$NON-NLS-1$ @@ -106,10 +107,10 @@ public class ModuleResolutionReport implements ResolutionReport { private static void printResolutionEntry(StringBuilder result, String prepend, ResolutionReport.Entry entry, Map<Resource, List<ResolutionReport.Entry>> reportEntries, Set<ModuleRevision> visited) { switch (entry.getType()) { case MISSING_CAPABILITY : - result.append(prepend).append("Unresolved requirement: ").append(entry.getData()).append('\n'); + result.append(prepend).append(Msg.ModuleResolutionReport_UnresolvedReq).append(entry.getData()).append('\n'); break; case SINGLETON_SELECTION : - result.append(prepend).append("Another singleton bundle selected: ").append(entry.getData()).append('\n'); + result.append(prepend).append(Msg.ModuleResolutionReport_AnotherSingleton).append(entry.getData()).append('\n'); break; case UNRESOLVED_PROVIDER : @SuppressWarnings("unchecked") @@ -121,7 +122,7 @@ public class ModuleResolutionReport implements ResolutionReport { Capability unresolvedCapability = unresolvedCapabilities.iterator().next(); // make sure this is not a case of importing and exporting the same package if (!unresolvedRequirement.getKey().getResource().equals(unresolvedCapability.getResource())) { - result.append(prepend).append("Unresolved requirement: ").append(unresolvedRequirement.getKey()).append('\n'); + result.append(prepend).append(Msg.ModuleResolutionReport_UnresolvedReq).append(unresolvedRequirement.getKey()).append('\n'); result.append(prepend).append(" -> ").append(unresolvedCapability).append('\n'); //$NON-NLS-1$ result.append(getResolutionReport(prepend + " ", (ModuleRevision) unresolvedCapability.getResource(), reportEntries, visited)); //$NON-NLS-1$ } @@ -129,10 +130,10 @@ public class ModuleResolutionReport implements ResolutionReport { } break; case FILTERED_BY_RESOLVER_HOOK : - result.append("Bundle was filtered by a resolver hook.").append('\n'); + result.append(Msg.ModuleResolutionReport_FilteredByHook).append('\n'); break; default : - result.append("Unknown error: ").append("type=").append(entry.getType()).append(" data=").append(entry.getData()).append('\n'); //$NON-NLS-2$ //$NON-NLS-3$ + result.append(Msg.ModuleResolutionReport_Unknown).append("type=").append(entry.getType()).append(" data=").append(entry.getData()).append('\n'); //$NON-NLS-1$ //$NON-NLS-2$ break; } } diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleResolver.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleResolver.java index 98af6612b..f25b838ce 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleResolver.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleResolver.java @@ -15,6 +15,7 @@ import java.util.*; import org.apache.felix.resolver.ResolverImpl; import org.eclipse.osgi.container.ModuleRequirement.DynamicModuleRequirement; import org.eclipse.osgi.internal.container.InternalUtils; +import org.eclipse.osgi.internal.messages.Msg; import org.eclipse.osgi.report.resolution.*; import org.eclipse.osgi.report.resolution.ResolutionReport.Entry; import org.eclipse.osgi.report.resolution.ResolutionReport.Entry.Type; @@ -591,7 +592,7 @@ final class ModuleResolver { if (threadResolving.get().booleanValue()) { // throw up a runtime exception, if this is caused by a resolver hook // then it will get caught at the call to the resolver hook and a proper exception is thrown - throw new IllegalStateException("Detected a recursive resolve operation."); + throw new IllegalStateException(Msg.ModuleResolver_RecursiveError); } threadResolving.set(Boolean.TRUE); try { @@ -615,7 +616,7 @@ final class ModuleResolver { // remove disabled from optional and triggers to prevent the resolver from resolving them optionals.removeAll(disabled); if (triggers.removeAll(disabled) && triggersMandatory) { - throw new ResolutionException("Could not resolve mandatory modules because another singleton was selected or the module was disabled: " + disabled); + throw new ResolutionException(Msg.ModuleResolver_SingletonDisabledError + disabled); } if (dynamicReq != null) { result = resolveDynamic(); @@ -796,7 +797,7 @@ final class ModuleResolver { private Map<Resource, List<Wire>> resolveDynamic() throws ResolutionException { if (!(resolver instanceof ResolverImpl)) { - throw new ResolutionException("Dynamic import resolution not supported by the resolver: " + resolver.getClass()); + throw new ResolutionException("Dynamic import resolution not supported by the resolver: " + resolver.getClass()); //$NON-NLS-1$ } List<Capability> dynamicMatches = filterProviders(dynamicReq.getOriginal(), moduleDatabase.findCapabilities(dynamicReq)); Collection<Resource> ondemandFragments = InternalUtils.asCollectionResource(moduleDatabase.getFragmentRevisions()); diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleRevisions.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleRevisions.java index 061cc98de..4f0f6f853 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleRevisions.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleRevisions.java @@ -113,7 +113,7 @@ public final class ModuleRevisions implements BundleRevisions { uninstalled = true; // save off the current revision if (revisions.isEmpty()) { - throw new IllegalStateException("Revisions is empty on uninstall!"); + throw new IllegalStateException("Revisions is empty on uninstall!"); //$NON-NLS-1$ } uninstalledCurrent = revisions.get(0); } diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/SystemModule.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/SystemModule.java index 259da76c1..ce3b07e17 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/SystemModule.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/SystemModule.java @@ -10,6 +10,8 @@ *******************************************************************************/ package org.eclipse.osgi.container; +import org.eclipse.osgi.internal.messages.Msg; + import java.util.*; import java.util.concurrent.TimeUnit; import org.eclipse.osgi.container.ModuleContainer.ContainerStartLevel; @@ -59,8 +61,8 @@ public abstract class SystemModule extends Module { if (ACTIVE_SET.contains(getState())) return; if (getState().equals(State.INSTALLED)) { - String reportMessage = ModuleResolutionReport.getResolutionReport("", getCurrentRevision(), report.getEntries(), null); - throw new BundleException("Could not resolve module: " + reportMessage, BundleException.RESOLVE_ERROR); + String reportMessage = ModuleResolutionReport.getResolutionReport("", getCurrentRevision(), report.getEntries(), null); //$NON-NLS-1$ + throw new BundleException(Msg.Module_ResolveError + reportMessage, BundleException.RESOLVE_ERROR); } } @@ -77,7 +79,7 @@ public abstract class SystemModule extends Module { if (t instanceof BundleException) { throw (BundleException) t; } - throw new BundleException("Error initializing container.", BundleException.ACTIVATOR_ERROR, t); + throw new BundleException("Error initializing container.", BundleException.ACTIVATOR_ERROR, t); //$NON-NLS-1$ } } finally { if (lockedStarted) { @@ -179,7 +181,7 @@ public abstract class SystemModule extends Module { stateChangeLock.unlock(); } } else { - throw new BundleException("Could not lock the system bundle state for shutdown."); + throw new BundleException(Msg.SystemModule_LockError); } } catch (InterruptedException e) { getRevisions().getContainer().adaptor.publishContainerEvent(ContainerEvent.ERROR, this, e); diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/builders/OSGiManifestBuilderFactory.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/builders/OSGiManifestBuilderFactory.java index 741cfd156..68d1a8daf 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/builders/OSGiManifestBuilderFactory.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/builders/OSGiManifestBuilderFactory.java @@ -187,13 +187,13 @@ public final class OSGiManifestBuilderFactory { } } else { if (manifest.get(Constants.IMPORT_PACKAGE) != null) - throw new BundleException("Extension bundles cannot import packages.", BundleException.MANIFEST_ERROR); + throw new BundleException(Msg.OSGiManifestBuilderFactory_ExtensionImportError, BundleException.MANIFEST_ERROR); if (manifest.get(Constants.REQUIRE_BUNDLE) != null) - throw new BundleException("Extension bundles cannot require bundles.", BundleException.MANIFEST_ERROR); + throw new BundleException(Msg.OSGiManifestBuilderFactory_ExtensionReqBundleError, BundleException.MANIFEST_ERROR); if (manifest.get(Constants.REQUIRE_CAPABILITY) != null) - throw new BundleException("Extension bundles cannot require bundles.", BundleException.MANIFEST_ERROR); + throw new BundleException(Msg.OSGiManifestBuilderFactory_ExtensionReqCapError, BundleException.MANIFEST_ERROR); if (manifest.get(Constants.BUNDLE_NATIVECODE) != null) - throw new BundleException("Extension bundles cannot have native code.", BundleException.MANIFEST_ERROR); + throw new BundleException(Msg.OSGiManifestBuilderFactory_ExtensionNativeError, BundleException.MANIFEST_ERROR); } } @@ -211,7 +211,7 @@ public final class OSGiManifestBuilderFactory { builder.setVersion((version != null) ? Version.parseVersion(version) : Version.emptyVersion); } catch (IllegalArgumentException ex) { if (manifestVersion >= 2) { - String message = NLS.bind("Invalid Manifest header \"{0}\": {1}", Constants.BUNDLE_VERSION, version); + String message = NLS.bind(Msg.OSGiManifestBuilderFactory_InvalidManifestError, Constants.BUNDLE_VERSION, version); throw new BundleException(message, BundleException.MANIFEST_ERROR, ex); } // prior to R4 the Bundle-Version header was not interpreted by the Framework; diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/namespaces/EclipsePlatformNamespace.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/namespaces/EclipsePlatformNamespace.java index be3c7ff03..ad3027e3a 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/namespaces/EclipsePlatformNamespace.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/namespaces/EclipsePlatformNamespace.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 IBM Corporation and others. + * Copyright (c) 2012, 2013 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 @@ -32,12 +32,12 @@ public class EclipsePlatformNamespace extends Namespace { * Namespace name for the eclipse platform. Unlike typical name spaces * this namespace is not intended to be used as an attribute. */ - public static final String ECLIPSE_PLATFORM_NAMESPACE = "eclipse.platform"; + public static final String ECLIPSE_PLATFORM_NAMESPACE = "eclipse.platform"; //$NON-NLS-1$ /** * Manifest header identifying the eclipse platform for the * bundle. The framework may run this bundle if filter * specified by this header matches the running eclipse platform. */ - public static final String ECLIPSE_PLATFORM_FILTER_HEADER = "Eclipse-PlatformFilter"; + public static final String ECLIPSE_PLATFORM_FILTER_HEADER = "Eclipse-PlatformFilter"; //$NON-NLS-1$ } diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/container/Capabilities.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/container/Capabilities.java index 5dcd4bb0b..776afd3a8 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/container/Capabilities.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/container/Capabilities.java @@ -37,7 +37,7 @@ public class Capabilities { void addCapability(ModuleCapability capability) { if (!name.equals(capability.getNamespace())) { - throw new IllegalArgumentException("Invalid namespace: " + capability.getNamespace() + ": expecting: " + name); + throw new IllegalArgumentException("Invalid namespace: " + capability.getNamespace() + ": expecting: " + name); //$NON-NLS-1$ //$NON-NLS-2$ } all.add(capability); // by convention we index by the namespace attribute @@ -75,7 +75,7 @@ public class Capabilities { void removeCapability(ModuleCapability capability) { if (!name.equals(capability.getNamespace())) { - throw new IllegalArgumentException("Invalid namespace: " + capability.getNamespace() + ": expecting: " + name); + throw new IllegalArgumentException("Invalid namespace: " + capability.getNamespace() + ": expecting: " + name); //$NON-NLS-1$//$NON-NLS-2$ } all.remove(capability); // by convention we index by the namespace attribute @@ -111,7 +111,7 @@ public class Capabilities { List<ModuleCapability> findCapabilities(Requirement requirement) { if (!name.equals(requirement.getNamespace())) { - throw new IllegalArgumentException("Invalid namespace: " + requirement.getNamespace() + ": expecting: " + name); + throw new IllegalArgumentException("Invalid namespace: " + requirement.getNamespace() + ": expecting: " + name); //$NON-NLS-1$//$NON-NLS-2$ } FilterImpl f = null; String filterSpec = requirement.getDirectives().get(Namespace.REQUIREMENT_FILTER_DIRECTIVE); diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/BundleContextImpl.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/BundleContextImpl.java index 23d78adb4..c89558d3c 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/BundleContextImpl.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/BundleContextImpl.java @@ -709,7 +709,7 @@ public class BundleContextImpl implements BundleContext, EventDispatcher<Object, if (e instanceof RuntimeException) { throw (RuntimeException) e; } - throw new BundleException("Error loading bundle activator.", BundleException.ACTIVATOR_ERROR, e); + throw new BundleException(Msg.BundleContextImpl_LoadActivatorError, BundleException.ACTIVATOR_ERROR, e); } if (activator != null) { diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/OSGiFrameworkHooks.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/OSGiFrameworkHooks.java index 0bb82c11b..22ea4a5d7 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/OSGiFrameworkHooks.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/OSGiFrameworkHooks.java @@ -75,7 +75,7 @@ class OSGiFrameworkHooks { return; } default : - throw new IllegalStateException("Bad configuration: " + container.getConfiguration().BSN_VERSION); + throw new IllegalStateException("Bad configuration: " + container.getConfiguration().BSN_VERSION); //$NON-NLS-1$ } } diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/buddy/PolicyHandler.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/buddy/PolicyHandler.java index 7aa516288..c08e0ef97 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/buddy/PolicyHandler.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/buddy/PolicyHandler.java @@ -96,7 +96,7 @@ public class PolicyHandler implements SynchronousBundleListener { } // Not a valid buddy policy EquinoxBundle bundle = (EquinoxBundle) policedLoader.getModuleClassLoader().getBundle(); - bundle.getModule().getContainer().getAdaptor().publishContainerEvent(ContainerEvent.ERROR, bundle.getModule(), new RuntimeException("Invalid buddy policy: " + buddyName)); + bundle.getModule().getContainer().getAdaptor().publishContainerEvent(ContainerEvent.ERROR, bundle.getModule(), new RuntimeException("Invalid buddy policy: " + buddyName)); //$NON-NLS-1$ policiesSnapshot[policyOrder] = null; // //Buddy policy can be provided by service implementations // BundleContext fwkCtx = policedLoader.bundle.framework.systemBundle.context; diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EventAdminAdapter.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EventAdminAdapter.java index 9dd8d9327..3ad412ab4 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EventAdminAdapter.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EventAdminAdapter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2012 IBM Corporation and others. + * Copyright (c) 2005, 2013 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 @@ -34,8 +34,8 @@ public class EventAdminAdapter implements ServiceTrackerCustomizer<Object, Objec public EventAdminAdapter(BundleContext context, ExtendedLogReaderServiceFactory logReaderServiceFactory) { this.context = context; this.logReaderServiceFactory = logReaderServiceFactory; - eventAdminTracker = new ServiceTracker<Object, Object>(context, "org.osgi.service.event.EventAdmin", this); - eventHandlerTracker = new ServiceTracker<Object, Object>(context, "org.osgi.service.event.EventHandler", this); + eventAdminTracker = new ServiceTracker<Object, Object>(context, "org.osgi.service.event.EventAdmin", this); //$NON-NLS-1$ + eventHandlerTracker = new ServiceTracker<Object, Object>(context, "org.osgi.service.event.EventHandler", this); //$NON-NLS-1$ } public void start() { diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/service/resolver/StateObjectFactory.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/service/resolver/StateObjectFactory.java index ec73c4065..5441949e4 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/service/resolver/StateObjectFactory.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/service/resolver/StateObjectFactory.java @@ -503,7 +503,7 @@ public interface StateObjectFactory { error = e; } if (error != null) { - throw new UnsupportedOperationException("Not able to create StateObjectFactory implementation: " + IMPL_NAME, error); + throw new UnsupportedOperationException("Not able to create StateObjectFactory implementation: " + IMPL_NAME, error); //$NON-NLS-1$ } } return implementation; diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/FrameworkExtensionInstaller.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/FrameworkExtensionInstaller.java index 93f0530db..112f8ae53 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/FrameworkExtensionInstaller.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/FrameworkExtensionInstaller.java @@ -105,9 +105,9 @@ public class FrameworkExtensionInstaller { try { callAddURLMethod(StorageUtil.encodeFileURL(files[i])); } catch (InvocationTargetException e) { - throw new BundleException("Error adding extension content.", e); + throw new BundleException("Error adding extension content.", e); //$NON-NLS-1$ } catch (MalformedURLException e) { - throw new BundleException("Error adding extension content.", e); + throw new BundleException("Error adding extension content.", e); //$NON-NLS-1$ } } try { @@ -187,7 +187,7 @@ public class FrameworkExtensionInstaller { try { activator.stop(context); } catch (Exception e) { - configuration.getHookRegistry().getContainer().getLogServices().log(EquinoxContainer.NAME, FrameworkLogEntry.ERROR, "Error stopping extension.", e); + configuration.getHookRegistry().getContainer().getLogServices().log(EquinoxContainer.NAME, FrameworkLogEntry.ERROR, "Error stopping extension.", e); //$NON-NLS-1$ } } } @@ -207,7 +207,7 @@ public class FrameworkExtensionInstaller { BundleActivator activator = (BundleActivator) activatorClass.newInstance(); startActivator(activator, context); } catch (Exception e) { - configuration.getHookRegistry().getContainer().getLogServices().log(EquinoxContainer.NAME, FrameworkLogEntry.ERROR, "Error starting extension.", e); + configuration.getHookRegistry().getContainer().getLogServices().log(EquinoxContainer.NAME, FrameworkLogEntry.ERROR, "Error activating extension.", e); //$NON-NLS-1$ } } @@ -218,7 +218,7 @@ public class FrameworkExtensionInstaller { hookActivators.add(activator); } } catch (Exception e) { - configuration.getHookRegistry().getContainer().getLogServices().log(EquinoxContainer.NAME, FrameworkLogEntry.ERROR, "Error activating extension.", e); + configuration.getHookRegistry().getContainer().getLogServices().log(EquinoxContainer.NAME, FrameworkLogEntry.ERROR, "Error activating extension.", e); //$NON-NLS-1$ } } diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java index 06a4ea399..9184bd353 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java @@ -280,7 +280,7 @@ public class Storage { try { save(); } catch (IOException e) { - getLogServices().log(EquinoxContainer.NAME, FrameworkLogEntry.ERROR, "Error saving on shutdown", e); + getLogServices().log(EquinoxContainer.NAME, FrameworkLogEntry.ERROR, "Error saving on shutdown", e); //$NON-NLS-1$ } // close all the generations diff --git a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/internal/messages/ExternalMessages.properties b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/internal/messages/ExternalMessages.properties index 59db1e6c7..58a5aecee 100644 --- a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/internal/messages/ExternalMessages.properties +++ b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/internal/messages/ExternalMessages.properties @@ -107,3 +107,39 @@ RESOURCE_NOT_FOUND_EXCEPTION=The resource {0} could not be found URL_NO_BUNDLE_ID=No bundle ID specified: {0} URL_INVALID_BUNDLE_ID=Invalid Bundle ID specified: {0} URL_NO_BUNDLE_FOUND=No bundle found for URL: {0} + +EclipseStarter_InstallLocation=No install location found. + +Module_Fragment_InvalidOperation=Invalid operation on a fragment. +Module_LockError=Unable to acquire the state change lock for the module: +Module_ResolveError=Could not resolve module: +Module_StartError=Error starting module. +Module_StopError=Error stopping module. +Module_Transient_StartError=Cannot transiently start a module whose start level is not met. +Module_UninstalledError=Module has been uninstalled. + +ModuleContainer_NameCollision=A bundle is already installed with the name "{0}" and version "{1}" +ModuleContainer_NameCollisionWithLocation=A bundle is already installed with the name "{0}" and version "{1}" at location: {2} +ModuleContainer_NegativeStartLevelError=Cannot set the start level to less than 1: +ModuleContainer_StateLockError=Could not acquire state change lock. +ModuleContainer_SystemNotActiveError=The system has not be activated yet. +ModuleContainer_SystemStartLevelError=Cannot set the start level of the system bundle. + +ModuleResolutionReport_AnotherSingleton=Another singleton bundle selected: +ModuleResolutionReport_FilteredByHook=Bundle was filtered by a resolver hook. +ModuleResolutionReport_NoReport=No resolution report for the bundle. +ModuleResolutionReport_Unknown=Unknown error: +ModuleResolutionReport_UnresolvedReq=Unresolved requirement: + +ModuleResolver_RecursiveError=Detected a recursive resolve operation. +ModuleResolver_SingletonDisabledError=Could not resolve mandatory modules because another singleton was selected or the module was disabled: + +OSGiManifestBuilderFactory_ExtensionImportError=Extension bundles cannot import packages. +OSGiManifestBuilderFactory_ExtensionNativeError=Extension bundles cannot have native code. +OSGiManifestBuilderFactory_ExtensionReqBundleError=Extension bundles cannot require bundles. +OSGiManifestBuilderFactory_ExtensionReqCapError=Extension bundles cannot require capabilities. +OSGiManifestBuilderFactory_InvalidManifestError=Invalid Manifest header "{0}": {1} + +SystemModule_LockError=Could not lock the system bundle state for shutdown. + +BundleContextImpl_LoadActivatorError=Error loading bundle activator. diff --git a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/internal/messages/Msg.java b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/internal/messages/Msg.java index 32f994a76..7de0d8dc9 100644 --- a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/internal/messages/Msg.java +++ b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/internal/messages/Msg.java @@ -42,6 +42,8 @@ public class Msg extends NLS { public static String SERVICE_OBJECTS_UNGET_ARGUMENT_EXCEPTION; + public static String SystemModule_LockError; + public static String BUNDLE_SYSTEMBUNDLE_UNINSTALL_EXCEPTION; public static String HEADER_DUPLICATE_KEY_EXCEPTION; @@ -112,4 +114,39 @@ public class Msg extends NLS { public static String URL_INVALID_BUNDLE_ID; public static String URL_NO_BUNDLE_FOUND; public static String URL_NO_BUNDLE_ID; + + public static String EclipseStarter_InstallLocation; + + public static String Module_Fragment_InvalidOperation; + public static String Module_LockError; + public static String Module_ResolveError; + + public static String Module_StartError; + public static String Module_StopError; + public static String Module_Transient_StartError; + public static String Module_UninstalledError; + + public static String ModuleContainer_NameCollision; + public static String ModuleContainer_NameCollisionWithLocation; + public static String ModuleContainer_NegativeStartLevelError; + public static String ModuleContainer_StateLockError; + public static String ModuleContainer_SystemNotActiveError; + public static String ModuleContainer_SystemStartLevelError; + + public static String ModuleResolutionReport_AnotherSingleton; + public static String ModuleResolutionReport_FilteredByHook; + public static String ModuleResolutionReport_NoReport; + public static String ModuleResolutionReport_Unknown; + public static String ModuleResolutionReport_UnresolvedReq; + + public static String ModuleResolver_RecursiveError; + public static String ModuleResolver_SingletonDisabledError; + + public static String OSGiManifestBuilderFactory_ExtensionImportError; + public static String OSGiManifestBuilderFactory_ExtensionNativeError; + public static String OSGiManifestBuilderFactory_ExtensionReqBundleError; + public static String OSGiManifestBuilderFactory_ExtensionReqCapError; + public static String OSGiManifestBuilderFactory_InvalidManifestError; + + public static String BundleContextImpl_LoadActivatorError; } diff --git a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/storagemanager/StorageManager.java b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/storagemanager/StorageManager.java index a3a3c29a6..7ddfe4c5b 100644 --- a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/storagemanager/StorageManager.java +++ b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/storagemanager/StorageManager.java @@ -561,7 +561,7 @@ public final class StorageManager { } catch (IOException ex) { // If IOException is thrown from our custom method. // log and swallow for now. - System.out.println("Unexpected IOException is thrown inside cleanupWithLock. Please look below for stacktrace"); + System.out.println("Unexpected IOException is thrown inside cleanupWithLock. Please look below for stacktrace"); //$NON-NLS-1$ ex.printStackTrace(System.out); } } |