diff options
Diffstat (limited to 'bundles/org.eclipse.osgi/supplement/src/org/eclipse')
7 files changed, 109 insertions, 147 deletions
diff --git a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/internal/core/ExternalMessages.properties b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/internal/core/ExternalMessages.properties index add5e3a54..91e9cadab 100644 --- a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/internal/core/ExternalMessages.properties +++ b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/internal/core/ExternalMessages.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2003, 2011 IBM Corporation and others. +# Copyright (c) 2003, 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 @@ -48,3 +48,45 @@ HEADER_DIRECTIVE_DUPLICATES=Duplicate directives are not permitted \"{0}\" HEADER_ATTRIBUTE_DUPLICATES=Duplicate attributes are not permitted \"{0}\" HEADER_EXTENSION_ERROR=Extension bundle is not a fragment to the system bundle \"{0}\" +#EclipseStarter messages +ECLIPSE_STARTUP_BUNDLE_NOT_FOUND=Bundle {0} not found. +ECLIPSE_STARTUP_ERROR_BUNDLE_NOT_RESOLVED=Bundle {0} was not resolved. +ECLIPSE_STARTUP_ERROR_BUNDLE_NOT_ACTIVE=Bundle {0} is not active. +ECLIPSE_STARTUP_ERROR_NO_APPLICATION=Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini). +#Don't use double quotes in the ECLIPSE_STARTUP_ERROR_CHECK_LOG. (See bug 86085) +ECLIPSE_STARTUP_ERROR_CHECK_LOG=An error has occurred. See the log file\n{0}. +ECLIPSE_STARTUP_ALREADY_RUNNING=Platform already running +ECLIPSE_STARTUP_NOT_RUNNING=Platform not running +ECLIPSE_STARTUP_STARTUP_ERROR=Startup error +ECLIPSE_STARTUP_APP_ERROR=Application error +ECLIPSE_STARTUP_SHUTDOWN_ERROR=Shutdown error +ECLIPSE_STARTUP_FAILED_INSTALL=Error installing bundle: {0} +ECLIPSE_STARTUP_FAILED_UNINSTALL=Error uninstalling bundle: {0} +ECLIPSE_STARTUP_FAILED_START=Error starting bundle: {0} +ECLIPSE_STARTUP_PROPS_NOT_SET=Cannot start without the following system properties set: {0} + +#Classloader messages +ECLIPSE_CLASSLOADER_CONCURRENT_STARTUP=While loading class "{1}", thread "{0}" timed out waiting ({4}ms) for thread "{2}" to finish starting bundle "{3}". To avoid deadlock, thread "{0}" is proceeding but "{1}" may not be fully initialized. +ECLIPSE_CLASSLOADER_ACTIVATION=An error occurred while automatically activating bundle {0} ({1}). + +#Location message +ECLIPSE_CANNOT_CHANGE_LOCATION = Cannot change the location once it is set. + +#NL Problem +error_badNL=Bad value: \"{0}\" for NL. Using system default. + +#FileMananger messages +fileManager_cannotLock = Unable to create lock manager. +fileManager_updateFailed = File update failed on one or more files. +fileManager_illegalInReadOnlyMode = Cannot perform operation while in read-only mode. +fileManager_notOpen = Manager is not opened. + +#Location messages +location_cannotLockNIO = An error occurred while locking file \"{0}\": \"{1}\". A common reason is that the file system or Runtime Environment does not support file locking for that location. Please choose a different location, or disable file locking by passing {2} as a VM argument. +location_cannotLock = An error occurred while locking file \"{0}\". +location_folderReadOnly = The folder \"{0}\" is read-only. +location_notSet = The location has not been set. +location_notFileProtocol = Unable to lock the location. The set location is not a file URL: {0} +location_noLockFile = The lock file has not been set. + +ECLIPSE_PLUGIN_EXTRACTION_PROBLEM = The URL \"{0}\" could not be extracted probably due to insufficient permissions or insufficient disk space. diff --git a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/internal/core/Msg.java b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/internal/core/Msg.java index e27634b34..4f66a9e2a 100644 --- a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/internal/core/Msg.java +++ b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/internal/core/Msg.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2011 IBM Corporation and others. + * Copyright (c) 2004, 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 @@ -63,4 +63,34 @@ public class Msg extends NLS { // initialize resource bundles NLS.initializeMessages(BUNDLE_NAME, Msg.class); } + + public static String ECLIPSE_CANNOT_CHANGE_LOCATION; + public static String fileManager_cannotLock; + public static String fileManager_updateFailed; + public static String fileManager_illegalInReadOnlyMode; + public static String fileManager_notOpen; + public static String ECLIPSE_CLASSLOADER_CONCURRENT_STARTUP; + public static String ECLIPSE_CLASSLOADER_ACTIVATION; + public static String ECLIPSE_STARTUP_ALREADY_RUNNING; + public static String ECLIPSE_STARTUP_STARTUP_ERROR; + public static String ECLIPSE_STARTUP_SHUTDOWN_ERROR; + public static String ECLIPSE_STARTUP_ERROR_CHECK_LOG; + public static String ECLIPSE_STARTUP_NOT_RUNNING; + public static String ECLIPSE_STARTUP_ERROR_NO_APPLICATION; + public static String ECLIPSE_STARTUP_ERROR_BUNDLE_NOT_ACTIVE; + public static String ECLIPSE_STARTUP_ERROR_BUNDLE_NOT_RESOLVED; + public static String ECLIPSE_STARTUP_BUNDLE_NOT_FOUND; + public static String ECLIPSE_STARTUP_FAILED_UNINSTALL; + public static String ECLIPSE_STARTUP_FAILED_INSTALL; + public static String ECLIPSE_STARTUP_FAILED_START; + public static String ECLIPSE_STARTUP_APP_ERROR; + public static String ECLIPSE_STARTUP_PROPS_NOT_SET; + public static String error_badNL; + public static String location_cannotLock; + public static String location_cannotLockNIO; + public static String location_folderReadOnly; + public static String location_notSet; + public static String location_notFileProtocol; + public static String location_noLockFile; + public static String ECLIPSE_PLUGIN_EXTRACTION_PROBLEM; } diff --git a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/internal/location/BasicLocation.java b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/internal/location/BasicLocation.java index f8c2e35e8..6cd3e9f77 100644 --- a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/internal/location/BasicLocation.java +++ b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/internal/location/BasicLocation.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 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 @@ -13,6 +13,7 @@ package org.eclipse.osgi.internal.location; import java.io.File; import java.io.IOException; import java.net.URL; +import org.eclipse.osgi.framework.internal.core.Msg; import org.eclipse.osgi.internal.framework.EquinoxConfiguration; import org.eclipse.osgi.service.datalocation.Location; import org.eclipse.osgi.util.NLS; @@ -125,7 +126,7 @@ public class BasicLocation implements Location { public synchronized boolean set(URL value, boolean lock, String lockFilePath) throws IllegalStateException, IOException { if (location != null) - throw new IllegalStateException(EclipseAdaptorMsg.ECLIPSE_CANNOT_CHANGE_LOCATION); + throw new IllegalStateException(Msg.ECLIPSE_CANNOT_CHANGE_LOCATION); File file = null; if (value.getProtocol().equalsIgnoreCase("file")) { //$NON-NLS-1$ try { @@ -163,7 +164,7 @@ public class BasicLocation implements Location { public synchronized boolean lock() throws IOException { if (!isSet()) - throw new IOException(EclipseAdaptorMsg.location_notSet); + throw new IOException(Msg.location_notSet); return lock(lockFile, location); } @@ -178,18 +179,18 @@ public class BasicLocation implements Location { */ private boolean lock(File lock, URL locationValue) throws IOException { if (isReadOnly) - throw new IOException(NLS.bind(EclipseAdaptorMsg.location_folderReadOnly, lock)); + throw new IOException(NLS.bind(Msg.location_folderReadOnly, lock)); if (lock == null) { if (locationValue != null && !"file".equalsIgnoreCase(locationValue.getProtocol())) //$NON-NLS-1$ - throw new IOException(NLS.bind(EclipseAdaptorMsg.location_notFileProtocol, locationValue)); - throw new IllegalStateException(EclipseAdaptorMsg.location_noLockFile); // this is really unexpected + throw new IOException(NLS.bind(Msg.location_notFileProtocol, locationValue)); + throw new IllegalStateException(Msg.location_noLockFile); // this is really unexpected } if (isLocked()) return false; File parentFile = new File(lock.getParent()); if (!parentFile.exists()) if (!parentFile.mkdirs()) - throw new IOException(NLS.bind(EclipseAdaptorMsg.location_folderReadOnly, parentFile)); + throw new IOException(NLS.bind(Msg.location_folderReadOnly, parentFile)); setLocker(lock); if (locker == null) @@ -240,7 +241,7 @@ public class BasicLocation implements Location { public URL getDataArea(String filename) throws IOException { URL base = getURL(); if (base == null) - throw new IOException(EclipseAdaptorMsg.location_notSet); + throw new IOException(Msg.location_notSet); String prefix = base.toExternalForm(); if (prefix.length() > 0 && prefix.charAt(prefix.length() - 1) != '/') prefix += '/'; diff --git a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/internal/location/EclipseAdaptorMessages.properties b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/internal/location/EclipseAdaptorMessages.properties deleted file mode 100644 index ce29cd962..000000000 --- a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/internal/location/EclipseAdaptorMessages.properties +++ /dev/null @@ -1,55 +0,0 @@ -############################################################################### -# Copyright (c) 2004, 2011 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 -# http://www.eclipse.org/legal/epl-v10.html -# -# Contributors: -# IBM Corporation - initial API and implementation -############################################################################### - -#External Messages for EN locale - -#EclipseStarter messages -ECLIPSE_STARTUP_BUNDLE_NOT_FOUND=Bundle {0} not found. -ECLIPSE_STARTUP_ERROR_BUNDLE_NOT_RESOLVED=Bundle {0} was not resolved. -ECLIPSE_STARTUP_ERROR_BUNDLE_NOT_ACTIVE=Bundle {0} is not active. -ECLIPSE_STARTUP_ERROR_NO_APPLICATION=Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini). -#Don't use double quotes in the ECLIPSE_STARTUP_ERROR_CHECK_LOG. (See bug 86085) -ECLIPSE_STARTUP_ERROR_CHECK_LOG=An error has occurred. See the log file\n{0}. -ECLIPSE_STARTUP_ALREADY_RUNNING=Platform already running -ECLIPSE_STARTUP_NOT_RUNNING=Platform not running -ECLIPSE_STARTUP_STARTUP_ERROR=Startup error -ECLIPSE_STARTUP_APP_ERROR=Application error -ECLIPSE_STARTUP_SHUTDOWN_ERROR=Shutdown error -ECLIPSE_STARTUP_FAILED_INSTALL=Error installing bundle: {0} -ECLIPSE_STARTUP_FAILED_UNINSTALL=Error uninstalling bundle: {0} -ECLIPSE_STARTUP_FAILED_START=Error starting bundle: {0} -ECLIPSE_STARTUP_PROPS_NOT_SET=Cannot start without the following system properties set: {0} - -#Classloader messages -ECLIPSE_CLASSLOADER_CONCURRENT_STARTUP=While loading class "{1}", thread "{0}" timed out waiting ({4}ms) for thread "{2}" to finish starting bundle "{3}". To avoid deadlock, thread "{0}" is proceeding but "{1}" may not be fully initialized. -ECLIPSE_CLASSLOADER_ACTIVATION=An error occurred while automatically activating bundle {0} ({1}). - -#Location message -ECLIPSE_CANNOT_CHANGE_LOCATION = Cannot change the location once it is set. - -#NL Problem -error_badNL=Bad value: \"{0}\" for NL. Using system default. - -#FileMananger messages -fileManager_cannotLock = Unable to create lock manager. -fileManager_updateFailed = File update failed on one or more files. -fileManager_illegalInReadOnlyMode = Cannot perform operation while in read-only mode. -fileManager_notOpen = Manager is not opened. - -#Location messages -location_cannotLockNIO = An error occurred while locking file \"{0}\": \"{1}\". A common reason is that the file system or Runtime Environment does not support file locking for that location. Please choose a different location, or disable file locking by passing {2} as a VM argument. -location_cannotLock = An error occurred while locking file \"{0}\". -location_folderReadOnly = The folder \"{0}\" is read-only. -location_notSet = The location has not been set. -location_notFileProtocol = Unable to lock the location. The set location is not a file URL: {0} -location_noLockFile = The lock file has not been set. - -ECLIPSE_PLUGIN_EXTRACTION_PROBLEM = The URL \"{0}\" could not be extracted probably due to insufficient permissions or insufficient disk space. diff --git a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/internal/location/EclipseAdaptorMsg.java b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/internal/location/EclipseAdaptorMsg.java deleted file mode 100644 index 2131d1ec3..000000000 --- a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/internal/location/EclipseAdaptorMsg.java +++ /dev/null @@ -1,59 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2011 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.osgi.internal.location; - -import org.eclipse.osgi.util.NLS; - -public class EclipseAdaptorMsg extends NLS { - private static final String BUNDLE_NAME = "org.eclipse.osgi.internal.location.EclipseAdaptorMessages"; //$NON-NLS-1$ - - public static String ECLIPSE_CANNOT_CHANGE_LOCATION; - - public static String fileManager_cannotLock; - public static String fileManager_updateFailed; - public static String fileManager_illegalInReadOnlyMode; - public static String fileManager_notOpen; - - public static String ECLIPSE_CLASSLOADER_CONCURRENT_STARTUP; - public static String ECLIPSE_CLASSLOADER_ACTIVATION; - - public static String ECLIPSE_STARTUP_ALREADY_RUNNING; - public static String ECLIPSE_STARTUP_STARTUP_ERROR; - public static String ECLIPSE_STARTUP_SHUTDOWN_ERROR; - public static String ECLIPSE_STARTUP_ERROR_CHECK_LOG; - public static String ECLIPSE_STARTUP_NOT_RUNNING; - public static String ECLIPSE_STARTUP_ERROR_NO_APPLICATION; - public static String ECLIPSE_STARTUP_ERROR_BUNDLE_NOT_ACTIVE; - public static String ECLIPSE_STARTUP_ERROR_BUNDLE_NOT_RESOLVED; - public static String ECLIPSE_STARTUP_BUNDLE_NOT_FOUND; - public static String ECLIPSE_STARTUP_FAILED_UNINSTALL; - public static String ECLIPSE_STARTUP_FAILED_INSTALL; - public static String ECLIPSE_STARTUP_FAILED_START; - public static String ECLIPSE_STARTUP_APP_ERROR; - public static String ECLIPSE_STARTUP_PROPS_NOT_SET; - - public static String error_badNL; - - public static String location_cannotLock; - public static String location_cannotLockNIO; - public static String location_folderReadOnly; - public static String location_notSet; - public static String location_notFileProtocol; - public static String location_noLockFile; - - public static String ECLIPSE_PLUGIN_EXTRACTION_PROBLEM; - - static { - // initialize resource bundles - NLS.initializeMessages(BUNDLE_NAME, EclipseAdaptorMsg.class); - } - -} diff --git a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/internal/location/Locker_JavaNio.java b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/internal/location/Locker_JavaNio.java index d6319fe5f..1ac9bd4a5 100644 --- a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/internal/location/Locker_JavaNio.java +++ b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/internal/location/Locker_JavaNio.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 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 @@ -15,6 +15,7 @@ package org.eclipse.osgi.internal.location; import java.io.*; import java.nio.channels.FileLock; import java.nio.channels.OverlappingFileLockException; +import org.eclipse.osgi.framework.internal.core.Msg; import org.eclipse.osgi.util.NLS; /** @@ -42,9 +43,9 @@ public class Locker_JavaNio implements Locker { } catch (IOException ioe) { // print exception if debugging if (debug) - System.out.println(NLS.bind(EclipseAdaptorMsg.location_cannotLock, lockFile)); + System.out.println(NLS.bind(Msg.location_cannotLock, lockFile)); // produce a more specific message for clients - String specificMessage = NLS.bind(EclipseAdaptorMsg.location_cannotLockNIO, new Object[] {lockFile, ioe.getMessage(), "\"-D" + BasicLocation.PROP_OSGI_LOCKING + "=none\""}); //$NON-NLS-1$ //$NON-NLS-2$ + String specificMessage = NLS.bind(Msg.location_cannotLockNIO, new Object[] {lockFile, ioe.getMessage(), "\"-D" + BasicLocation.PROP_OSGI_LOCKING + "=none\""}); //$NON-NLS-1$ //$NON-NLS-2$ throw new IOException(specificMessage); } catch (OverlappingFileLockException e) { // handle it as null result @@ -92,9 +93,9 @@ public class Locker_JavaNio implements Locker { tempLock = temp.getChannel().tryLock(0, 1, false); } catch (IOException ioe) { if (debug) - System.out.println(NLS.bind(EclipseAdaptorMsg.location_cannotLock, lockFile)); + System.out.println(NLS.bind(Msg.location_cannotLock, lockFile)); // produce a more specific message for clients - String specificMessage = NLS.bind(EclipseAdaptorMsg.location_cannotLockNIO, new Object[] {lockFile, ioe.getMessage(), "\"-D" + BasicLocation.PROP_OSGI_LOCKING + "=none\""}); //$NON-NLS-1$ //$NON-NLS-2$ + String specificMessage = NLS.bind(Msg.location_cannotLockNIO, new Object[] {lockFile, ioe.getMessage(), "\"-D" + BasicLocation.PROP_OSGI_LOCKING + "=none\""}); //$NON-NLS-1$ //$NON-NLS-2$ throw new IOException(specificMessage); } if (tempLock != null) { 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 f975dfe95..c09511280 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 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2011 IBM Corporation and others. + * Copyright (c) 2004, 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 @@ -13,9 +13,11 @@ package org.eclipse.osgi.storagemanager; import java.io.*; import java.security.AccessController; import java.util.*; +import org.eclipse.osgi.framework.internal.core.Msg; import org.eclipse.osgi.framework.internal.reliablefile.*; import org.eclipse.osgi.framework.util.SecureAction; -import org.eclipse.osgi.internal.location.*; +import org.eclipse.osgi.internal.location.BasicLocation; +import org.eclipse.osgi.internal.location.Locker; /** * Storage managers provide a facility for tracking the state of a group of files having @@ -214,11 +216,11 @@ public final class StorageManager { */ private void add(String managedFile, int fileType) throws IOException { if (!open) - throw new IOException(EclipseAdaptorMsg.fileManager_notOpen); + throw new IOException(Msg.fileManager_notOpen); if (readOnly) - throw new IOException(EclipseAdaptorMsg.fileManager_illegalInReadOnlyMode); + throw new IOException(Msg.fileManager_illegalInReadOnlyMode); if (!lock(true)) - throw new IOException(EclipseAdaptorMsg.fileManager_cannotLock); + throw new IOException(Msg.fileManager_cannotLock); try { updateTable(); Entry entry = (Entry) table.get(managedFile); @@ -285,11 +287,11 @@ public final class StorageManager { */ public void update(String[] managedFiles, String[] sources) throws IOException { if (!open) - throw new IOException(EclipseAdaptorMsg.fileManager_notOpen); + throw new IOException(Msg.fileManager_notOpen); if (readOnly) - throw new IOException(EclipseAdaptorMsg.fileManager_illegalInReadOnlyMode); + throw new IOException(Msg.fileManager_illegalInReadOnlyMode); if (!lock(true)) - throw new IOException(EclipseAdaptorMsg.fileManager_cannotLock); + throw new IOException(Msg.fileManager_cannotLock); try { updateTable(); int[] originalReadIDs = new int[managedFiles.length]; @@ -305,7 +307,7 @@ public final class StorageManager { Entry entry = (Entry) table.get(managedFiles[i]); entry.setReadId(originalReadIDs[i]); } - throw new IOException(EclipseAdaptorMsg.fileManager_updateFailed); + throw new IOException(Msg.fileManager_updateFailed); } save(); //save only if no errors } finally { @@ -384,7 +386,7 @@ public final class StorageManager { if (locker == null) { locker = BasicLocation.createLocker(lockFile, lockMode, false); if (locker == null) - throw new IOException(EclipseAdaptorMsg.fileManager_cannotLock); + throw new IOException(Msg.fileManager_cannotLock); } boolean locked = locker.lock(); if (locked || !wait) @@ -423,7 +425,7 @@ public final class StorageManager { */ public File lookup(String managedFile, boolean add) throws IOException { if (!open) - throw new IOException(EclipseAdaptorMsg.fileManager_notOpen); + throw new IOException(Msg.fileManager_notOpen); Entry entry = (Entry) table.get(managedFile); if (entry == null) { if (add) { @@ -463,13 +465,13 @@ public final class StorageManager { */ public void remove(String managedFile) throws IOException { if (!open) - throw new IOException(EclipseAdaptorMsg.fileManager_notOpen); + throw new IOException(Msg.fileManager_notOpen); if (readOnly) - throw new IOException(EclipseAdaptorMsg.fileManager_illegalInReadOnlyMode); + throw new IOException(Msg.fileManager_illegalInReadOnlyMode); // The removal needs to be done eagerly, so the value is effectively removed from the disktable. // Otherwise, an updateTable() caused by an update(,) could cause the file to readded to the local table. if (!lock(true)) - throw new IOException(EclipseAdaptorMsg.fileManager_cannotLock); + throw new IOException(Msg.fileManager_cannotLock); try { updateTable(); table.remove(managedFile); @@ -601,7 +603,7 @@ public final class StorageManager { return; //Lock first, so someone else can not start while we're in the middle of cleanup if (doLock && !lock(true)) - throw new IOException(EclipseAdaptorMsg.fileManager_cannotLock); + throw new IOException(Msg.fileManager_cannotLock); try { //Iterate through the temp files and delete them all, except the one representing this storage manager. String[] files = managerRoot.list(); @@ -696,12 +698,12 @@ public final class StorageManager { if (!readOnly) { managerRoot.mkdirs(); if (!managerRoot.exists()) - throw new IOException(EclipseAdaptorMsg.fileManager_cannotLock); + throw new IOException(Msg.fileManager_cannotLock); if (openCleanup) cleanup(true); boolean locked = lock(wait); if (!locked && wait) - throw new IOException(EclipseAdaptorMsg.fileManager_cannotLock); + throw new IOException(Msg.fileManager_cannotLock); } try { @@ -726,7 +728,7 @@ public final class StorageManager { */ public File createTempFile(String file) throws IOException { if (readOnly) - throw new IOException(EclipseAdaptorMsg.fileManager_illegalInReadOnlyMode); + throw new IOException(Msg.fileManager_illegalInReadOnlyMode); File tmpFile = File.createTempFile(file, ReliableFile.tmpExt, base); // bug 350106: do not use deleteOnExit() If clients really want that the // they can call it themselves. |