Fixed bug 63373 - provide a better message when locking fails
diff --git a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/InternalPlatform.java b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/InternalPlatform.java
index 05a3351..60d9b4b 100644
--- a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/InternalPlatform.java
+++ b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/InternalPlatform.java
@@ -365,7 +365,7 @@
* and should not try to access the instance data area.
*/
- public void start(BundleContext runtimeContext) {
+ public void start(BundleContext runtimeContext) throws IOException {
this.context = runtimeContext;
initializeLocationTrackers();
ResourceTranslator.start();
@@ -379,7 +379,15 @@
getMetaArea();
initializeAuthorizationHandler();
platformLog = new PlatformLogWriter();
- addLogListener(platformLog);
+ addLogListener(platformLog);
+ initializeRuntimeFileManager();
+ }
+
+ private void initializeRuntimeFileManager() throws IOException {
+ File controlledDir = new File(InternalPlatform.getDefault().getConfigurationLocation().getURL().getPath() + '/' + Platform.PI_RUNTIME);
+ controlledDir.mkdirs();
+ runtimeFileManager = new FileManager(controlledDir);
+ runtimeFileManager.open(true);
}
private Runnable getSplashHandler() {
@@ -1206,16 +1214,6 @@
}
public FileManager getRuntimeFileManager() {
- if (runtimeFileManager == null) {
- try {
- File controlledDir = new File(InternalPlatform.getDefault().getConfigurationLocation().getURL().getPath() + '/' + Platform.PI_RUNTIME);
- controlledDir.mkdirs();
- runtimeFileManager = new FileManager(controlledDir);
- runtimeFileManager.open(true);
- } catch (IOException e) {
- getFrameworkLog().log(new FrameworkLogEntry(Platform.PI_RUNTIME, Policy.bind("meta.fileManagerInitializationFailed", InternalPlatform.getDefault().getConfigurationLocation().getURL().getPath() + '/' + Platform.PI_RUNTIME), 0, e, null)); //$NON-NLS-1$
- }
- }
return runtimeFileManager;
}
diff --git a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/PlatformActivator.java b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/PlatformActivator.java
index 0b51800..1f3c30e 100644
--- a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/PlatformActivator.java
+++ b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/PlatformActivator.java
@@ -161,7 +161,7 @@
return result;
}
- public void stop(BundleContext runtimeContext) throws Exception {
+ public void stop(BundleContext runtimeContext) throws IOException {
// Stop the registry
stopRegistry(runtimeContext);
environmentInfoServiceReleased(environmentServiceReference);
@@ -174,7 +174,7 @@
InternalPlatform.getDefault().getRuntimeFileManager().close();
}
- private void stopRegistry(BundleContext runtimeContext) {
+ private void stopRegistry(BundleContext runtimeContext) throws IOException {
runtimeContext.removeBundleListener(this.pluginBundleListener);
ExtensionRegistry registry = (ExtensionRegistry) InternalPlatform.getDefault().getRegistry();
if (registry == null)
@@ -229,7 +229,7 @@
InternalPlatform.packageAdmin = (PackageAdmin) context.getService(packageAdminReference);
}
- private void startInternalPlatform() {
+ private void startInternalPlatform() throws IOException {
InternalPlatform.getDefault().start(context);
}