mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-09 18:56:02 +02:00
cache user home
This commit is contained in:
parent
afba103bf3
commit
05d2bc10e9
1 changed files with 7 additions and 0 deletions
|
@ -56,6 +56,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
|
||||||
protected IFileService _hostFileService;
|
protected IFileService _hostFileService;
|
||||||
protected ISearchService _hostSearchService;
|
protected ISearchService _hostSearchService;
|
||||||
protected IHostFileToRemoteFileAdapter _hostFileToRemoteFileAdapter;
|
protected IHostFileToRemoteFileAdapter _hostFileToRemoteFileAdapter;
|
||||||
|
protected IRemoteFile _userHome;
|
||||||
|
|
||||||
public FileServiceSubSystem(IHost host, IConnectorService connectorService, IFileService hostFileService, IHostFileToRemoteFileAdapter fileAdapter, ISearchService searchService)
|
public FileServiceSubSystem(IHost host, IConnectorService connectorService, IFileService hostFileService, IHostFileToRemoteFileAdapter fileAdapter, ISearchService searchService)
|
||||||
{
|
{
|
||||||
|
@ -240,6 +241,10 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
|
||||||
*/
|
*/
|
||||||
protected IRemoteFile getUserHome()
|
protected IRemoteFile getUserHome()
|
||||||
{
|
{
|
||||||
|
if (_userHome != null)
|
||||||
|
{
|
||||||
|
return _userHome;
|
||||||
|
}
|
||||||
IRemoteFile root = getCachedRemoteFile(".");
|
IRemoteFile root = getCachedRemoteFile(".");
|
||||||
if (root != null && !root.isStale()) {
|
if (root != null && !root.isStale()) {
|
||||||
return root;
|
return root;
|
||||||
|
@ -258,6 +263,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
|
||||||
}
|
}
|
||||||
root = getHostFileToRemoteFileAdapter().convertToRemoteFile(this, getDefaultContext(), parent, userHome);
|
root = getHostFileToRemoteFileAdapter().convertToRemoteFile(this, getDefaultContext(), parent, userHome);
|
||||||
cacheRemoteFile(root, ".");
|
cacheRemoteFile(root, ".");
|
||||||
|
_userHome = root;
|
||||||
return root;
|
return root;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -792,6 +798,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
|
||||||
{
|
{
|
||||||
super.uninitializeSubSystem(monitor);
|
super.uninitializeSubSystem(monitor);
|
||||||
getFileService().uninitService(monitor);
|
getFileService().uninitService(monitor);
|
||||||
|
_userHome = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue