{
SchemaWrapper schemaWrapper = ( SchemaWrapper ) getWrapper( Activator.getDefault().getSchemaHandler()
.getSchema( oc.getSchemaName() ) );
if ( schemaWrapper != null )
{
ObjectClassWrapper ocw = null;
int group = store.getInt( PluginConstants.PREFS_SCHEMA_VIEW_GROUPING );
if ( group == PluginConstants.PREFS_SCHEMA_VIEW_GROUPING_FOLDERS )
{
for ( TreeNode child : schemaWrapper.getChildren() )
{
if ( ( ( Folder ) child ).getType() == FolderType.OBJECT_CLASS )
{
ocw = new ObjectClassWrapper( oc, child );
break;
}
}
}
else if ( group == PluginConstants.PREFS_SCHEMA_VIEW_GROUPING_MIXED )
{
ocw = new ObjectClassWrapper( oc, schemaWrapper );
}
ocw.getParent().addChild( ocw );
elementsToWrappersMap.put( oc, ocw );
}
}