*/
public Object[] getChildren( Object parentElement )
{
if ( parentElement instanceof SchemaElementsViewRoot )
{
SchemaElementsViewRoot root = ( SchemaElementsViewRoot ) parentElement;
List<ITreeNode> children = new ArrayList<ITreeNode>();
int group = store.getInt( PluginConstants.PREFS_SCHEMA_ELEMENTS_VIEW_GROUPING );
int sortBy = store.getInt( PluginConstants.PREFS_SCHEMA_ELEMENTS_VIEW_SORTING_BY );
int sortOrder = store.getInt( PluginConstants.PREFS_SCHEMA_ELEMENTS_VIEW_SORTING_ORDER );
boolean hideAttributeTypes = Activator.getDefault().getDialogSettings().getBoolean(
HideAttributeTypesAction.HIDE_ATTRIBUTE_TYPES_DS_KEY );
boolean hideObjectClasses = Activator.getDefault().getDialogSettings().getBoolean(
HideObjectClassesAction.HIDE_OBJECT_CLASSES_DS_KEY );
if ( root.getChildren().isEmpty() )
{
// ATTRIBUTE TYPES
List<AttributeType> attributeTypes = schemaPool.getAttributeTypes();
for ( AttributeType attributeType : attributeTypes )
{
root.addChild( new AttributeTypeWrapper( attributeType, root ) );
}
// OBJECT CLASSES
List<ObjectClass> objectClasses = schemaPool.getObjectClasses();
for ( ObjectClass objectClass : objectClasses )
{
root.addChild( new ObjectClassWrapper( objectClass, root ) );
}
}
List<AttributeTypeWrapper> atList = new ArrayList<AttributeTypeWrapper>();
List<ObjectClassWrapper> ocList = new ArrayList<ObjectClassWrapper>();
if ( !hideAttributeTypes )
{
atList = root.getAttributeTypes();
}
if ( !hideObjectClasses )
{
ocList = root.getObjectClasses();
}
if ( group == PluginConstants.PREFS_SCHEMA_ELEMENTS_VIEW_GROUPING_ATFIRST )
{
// Sort by