1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-15 04:55:22 +02:00

[228343] RSE unable to recover after RemoteSystemsTempfiles deletion

This commit is contained in:
David McKnight 2008-04-23 16:16:16 +00:00
parent ed10f3bbb1
commit 1d82ed5997

View file

@ -15,6 +15,7 @@
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
* Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core * Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
* David McKnight (IBM) - [195285] mount path mapper changes * David McKnight (IBM) - [195285] mount path mapper changes
* David McKnight (IBM) - [228343] RSE unable to recover after RemoteSystemsTempfiles deletion
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.files.ui.resources; package org.eclipse.rse.internal.files.ui.resources;
@ -35,6 +36,8 @@ import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IConfigurationElement; import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtensionRegistry; import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.rse.core.RSECorePlugin; import org.eclipse.rse.core.RSECorePlugin;
@ -304,11 +307,22 @@ public class SystemRemoteEditManager
{ {
if (editProject != null) if (editProject != null)
{ {
if (!editProject.exists()) IProgressMonitor monitor = new NullProgressMonitor();
editProject.create(null); if (!editProject.exists())
editProject.create(monitor);
if (!editProject.isOpen()) if (!editProject.isOpen()){
editProject.open(null); try {
editProject.open(monitor);
}
catch (CoreException e) {
// probably no .project file
// time to start again!
editProject.delete(true, monitor);
editProject.create(monitor);
editProject.open(monitor);
}
}
IProjectDescription description = editProject.getDescription(); IProjectDescription description = editProject.getDescription();
String[] natures = description.getNatureIds(); String[] natures = description.getNatureIds();
@ -337,6 +351,7 @@ public class SystemRemoteEditManager
} }
catch (CoreException e) catch (CoreException e)
{ {
e.printStackTrace();
SystemBasePlugin.logError("Error creating temp project", e); //$NON-NLS-1$ SystemBasePlugin.logError("Error creating temp project", e); //$NON-NLS-1$
} }
return editProject; return editProject;