{
final IRootDSE rootDSE = ( IRootDSE ) parent;
if ( !rootDSE.isChildrenInitialized() && rootDSE.isDirectoryEntry() )
{
new InitializeChildrenJob( new IEntry[]
{ rootDSE } ).execute();
return new String[]
{ "Fetching Entries..." };
}
// get base entries
List<IEntry> entryList = new ArrayList<IEntry>();
entryList.addAll( Arrays.asList( rootDSE.getChildren() ) );
// remove non-visible entries
for ( Iterator<IEntry> it = entryList.iterator(); it.hasNext(); )
{
Object o = it.next();
if ( !preferences.isShowDirectoryMetaEntries() && ( o instanceof DirectoryMetadataEntry ) )
{
it.remove();
}
}
return entryList.toArray();
}
else if ( parent instanceof IEntry )
{
final IEntry parentEntry = ( IEntry ) parent;
if ( !parentEntry.isChildrenInitialized() && parentEntry.isDirectoryEntry() )
{
new InitializeChildrenJob( new IEntry[]
{ parentEntry } ).execute();
return new String[]
{ "Fetching Entries..." };
}