mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-09 10:05:24 +02:00
[148978] fix so that empty folders show as having been queried on linux clients
This commit is contained in:
parent
5deeba081e
commit
94e0ef912d
2 changed files with 17 additions and 2 deletions
|
@ -45,6 +45,7 @@ import org.eclipse.rse.core.model.IHost;
|
||||||
import org.eclipse.rse.core.model.ISystemMessageObject;
|
import org.eclipse.rse.core.model.ISystemMessageObject;
|
||||||
import org.eclipse.rse.core.model.ISystemRegistry;
|
import org.eclipse.rse.core.model.ISystemRegistry;
|
||||||
import org.eclipse.rse.core.model.ISystemResourceSet;
|
import org.eclipse.rse.core.model.ISystemResourceSet;
|
||||||
|
import org.eclipse.rse.core.model.SystemChildrenContentsType;
|
||||||
import org.eclipse.rse.core.model.SystemMessageObject;
|
import org.eclipse.rse.core.model.SystemMessageObject;
|
||||||
import org.eclipse.rse.core.model.SystemWorkspaceResourceSet;
|
import org.eclipse.rse.core.model.SystemWorkspaceResourceSet;
|
||||||
import org.eclipse.rse.core.subsystems.ISubSystem;
|
import org.eclipse.rse.core.subsystems.ISubSystem;
|
||||||
|
@ -522,6 +523,11 @@ public class SystemViewRemoteFileAdapter
|
||||||
{
|
{
|
||||||
AbstractTreeViewer atv = (AbstractTreeViewer) getViewer();
|
AbstractTreeViewer atv = (AbstractTreeViewer) getViewer();
|
||||||
isOpen = atv.getExpandedState(element);
|
isOpen = atv.getExpandedState(element);
|
||||||
|
if (!isOpen)
|
||||||
|
{
|
||||||
|
if (!hasChildren(element))
|
||||||
|
isOpen = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (file.isRoot())
|
if (file.isRoot())
|
||||||
return RSEUIPlugin.getDefault().getImageDescriptor(isOpen ? ISystemIconConstants.ICON_SYSTEM_ROOTDRIVEOPEN_ID : ISystemIconConstants.ICON_SYSTEM_ROOTDRIVE_ID);
|
return RSEUIPlugin.getDefault().getImageDescriptor(isOpen ? ISystemIconConstants.ICON_SYSTEM_ROOTDRIVEOPEN_ID : ISystemIconConstants.ICON_SYSTEM_ROOTDRIVE_ID);
|
||||||
|
@ -784,6 +790,13 @@ public class SystemViewRemoteFileAdapter
|
||||||
hasChildren = file.hasContents(RemoteChildrenContentsType.getInstance());
|
hasChildren = file.hasContents(RemoteChildrenContentsType.getInstance());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// check that the children are actually there
|
||||||
|
Object[] contents = file.getContents(RemoteChildrenContentsType.getInstance());
|
||||||
|
if (!file.isStale() && contents != null && contents.length == 0 )
|
||||||
|
hasChildren = false;
|
||||||
|
}
|
||||||
|
|
||||||
return hasChildren;
|
return hasChildren;
|
||||||
}
|
}
|
||||||
|
|
|
@ -861,7 +861,9 @@ public abstract class RemoteFile implements IRemoteFile, IAdaptable, Comparable
|
||||||
filter = "*"; //$NON-NLS-1$
|
filter = "*"; //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
if (con != null && con.length > 0)
|
// DKM - consider all containers so that we can tell if an empty one
|
||||||
|
// has been queried before (i.e. via IRemoteFile[0] as it's contents vs null)
|
||||||
|
// if (con != null && con.length > 0)
|
||||||
{
|
{
|
||||||
isContainer = true;
|
isContainer = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue