mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-03 23:25:26 +02:00
use EFS null store when unable to connect
This commit is contained in:
parent
20df494a4a
commit
0238daf805
1 changed files with 8 additions and 3 deletions
|
@ -19,8 +19,10 @@ package org.eclipse.rse.eclipse.filesystem;
|
|||
import java.net.URI;
|
||||
import java.util.HashMap;
|
||||
|
||||
import org.eclipse.core.filesystem.EFS;
|
||||
import org.eclipse.core.filesystem.IFileStore;
|
||||
import org.eclipse.core.filesystem.provider.FileSystem;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||
import org.eclipse.rse.core.subsystems.IConnectorService;
|
||||
import org.eclipse.rse.model.IHost;
|
||||
|
@ -96,7 +98,7 @@ public class RSEFileSystem extends FileSystem
|
|||
return fstore.toURI();
|
||||
}
|
||||
|
||||
public IFileStore getStore(URI uri)
|
||||
public IFileStore getStore(URI uri)
|
||||
{
|
||||
Object obj = _fileStoreMap.get(uri);
|
||||
if (obj != null)
|
||||
|
@ -117,7 +119,8 @@ public class RSEFileSystem extends FileSystem
|
|||
ss.connect(shell);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return store;
|
||||
|
@ -172,7 +175,9 @@ public class RSEFileSystem extends FileSystem
|
|||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
return FileStoreConversionUtility.convert(null, new RemoteFileEmpty());
|
||||
return EFS.getNullFileSystem().getStore(uri);
|
||||
|
||||
//return FileStoreConversionUtility.convert(null, new RemoteFileEmpty());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue