mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-09 10:46: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 ISearchService _hostSearchService;
|
||||
protected IHostFileToRemoteFileAdapter _hostFileToRemoteFileAdapter;
|
||||
protected IRemoteFile _userHome;
|
||||
|
||||
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()
|
||||
{
|
||||
if (_userHome != null)
|
||||
{
|
||||
return _userHome;
|
||||
}
|
||||
IRemoteFile root = getCachedRemoteFile(".");
|
||||
if (root != null && !root.isStale()) {
|
||||
return root;
|
||||
|
@ -258,6 +263,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
|
|||
}
|
||||
root = getHostFileToRemoteFileAdapter().convertToRemoteFile(this, getDefaultContext(), parent, userHome);
|
||||
cacheRemoteFile(root, ".");
|
||||
_userHome = root;
|
||||
return root;
|
||||
}
|
||||
|
||||
|
@ -792,6 +798,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
|
|||
{
|
||||
super.uninitializeSubSystem(monitor);
|
||||
getFileService().uninitService(monitor);
|
||||
_userHome = null;
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Reference in a new issue