*/
private void aTOrOCRemoved( SchemaPool p, LDAPModelEvent e )
{
SchemaElement element = ( SchemaElement ) e.getOldValue();
ITreeNode parentNode = findParentElement( element );
if ( parentNode == null )
{
return;
}
ITreeNode fakeNode = null;
if ( element instanceof ObjectClass )
{
( ( ObjectClass ) element ).closeAssociatedEditor();
fakeNode = new ObjectClassWrapper( ( ObjectClass ) element, null );
}
else if ( element instanceof AttributeType )
{
( ( AttributeType ) element ).closeAssociatedEditor();
fakeNode = new AttributeTypeWrapper( ( AttributeType ) element, null );
}
ITreeNode realNode = null;
Object[] children = getChildren( parentNode );
for ( Object child : children )
{
if ( child.equals( fakeNode ) )
{
realNode = ( ITreeNode ) child;
break;
}
}
if ( realNode != null )
{
realNode.getParent().removeChild( realNode );
viewer.refresh( realNode.getParent() );
}
}