Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2010-02-22 15:23:26 +0000
committerThomas Watson2010-02-22 15:23:26 +0000
commit0294b23b13e685fe543bacfce545c37dab6ca26e (patch)
tree31e38794486b828975726b78e96737a89d0e7d11 /bundles
parent974dc9aef879122ec2604dd0f825bc8828460ee3 (diff)
downloadrt.equinox.framework-0294b23b13e685fe543bacfce545c37dab6ca26e.tar.gz
rt.equinox.framework-0294b23b13e685fe543bacfce545c37dab6ca26e.tar.xz
rt.equinox.framework-0294b23b13e685fe543bacfce545c37dab6ca26e.zip
Bug 303071 - The framework should fail to launch if the storage area (configuration) cannot be locked
- Externalize the message
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/AdaptorMsg.java4
-rw-r--r--bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/BaseStorage.java6
-rw-r--r--bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/ExternalMessages.properties4
3 files changed, 8 insertions, 6 deletions
diff --git a/bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/AdaptorMsg.java b/bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/AdaptorMsg.java
index 48277287d..3185ff22a 100644
--- a/bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/AdaptorMsg.java
+++ b/bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/AdaptorMsg.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 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
@@ -31,6 +31,8 @@ public class AdaptorMsg extends NLS {
public static String ADAPTOR_EXTENSION_NATIVECODE_ERROR;
public static String ADAPTOR_EXTENSION_REQUIRE_ERROR;
public static String ADAPTOR_STORAGE_EXCEPTION;
+ public static String ADAPTOR_STORAGE_INIT_FAILED_MSG;
+ public static String ADAPTOR_STORAGE_INIT_FAILED_TITLE;
public static String ADAPTOR_URL_CREATE_EXCEPTION;
public static String BUNDLE_CLASSPATH_ENTRY_NOT_FOUND_EXCEPTION;
diff --git a/bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/BaseStorage.java b/bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/BaseStorage.java
index 46962b2c8..48d31e56b 100644
--- a/bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/BaseStorage.java
+++ b/bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/BaseStorage.java
@@ -220,10 +220,8 @@ public class BaseStorage implements SynchronousBundleListener {
FrameworkLogEntry logEntry = new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, FrameworkLogEntry.ERROR, 0, message, 0, ex, null);
adaptor.getFrameworkLog().log(logEntry);
FrameworkProperties.setProperty(EclipseStarter.PROP_EXITCODE, "15"); //$NON-NLS-1$
- FrameworkProperties.setProperty(EclipseStarter.PROP_EXITDATA, "<title>Invalid Configuration Location</title>Locking in directory '" + baseDir + //$NON-NLS-1$
- "' is not possible. A common reason is that the file system or Runtime Environment does not support file locking for that location. " + //$NON-NLS-1$
- "Please choose a different location, or disable file locking passing \"-Dosgi.locking=none\" as a VM argument.\n" + //$NON-NLS-1$
- ex.getMessage());
+ String errorDialog = "<title>" + AdaptorMsg.ADAPTOR_STORAGE_INIT_FAILED_TITLE + "</title>" + NLS.bind(AdaptorMsg.ADAPTOR_STORAGE_INIT_FAILED_MSG, baseDir) + "\n" + ex.getMessage(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ FrameworkProperties.setProperty(EclipseStarter.PROP_EXITDATA, errorDialog);
throw ex;
}
return sManager;
diff --git a/bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/ExternalMessages.properties b/bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/ExternalMessages.properties
index 36c862014..d83e88923 100644
--- a/bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/ExternalMessages.properties
+++ b/bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/ExternalMessages.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2003, 2009 IBM Corporation and others.
+# Copyright (c) 2003, 2010 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
@@ -12,6 +12,8 @@
#External Messages for EN locale
ADAPTOR_STORAGE_EXCEPTION=The FrameworkAdaptor object could not perform the operation
+ADAPTOR_STORAGE_INIT_FAILED_MSG=Locking is not possible in the directory \"{0}\". 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 passing \"-Dosgi.locking=none\" as a VM argument.
+ADAPTOR_STORAGE_INIT_FAILED_TITLE =Invalid Configuration Location
ADAPTOR_URL_CREATE_EXCEPTION=\"{0}\" is an invalid URL
ADAPTOR_DIRECTORY_CREATE_EXCEPTION=The directory \"{0}\" could not be created
ADAPTOR_DIRECTORY_EXCEPTION=The file \"{0}\" is not a directory

Back to the top