else if ( selectedElement instanceof AttributeTypeWrapper )
{
MutableAttributeType attributeType = ( MutableAttributeType ) ( ( AttributeTypeWrapper ) selectedElement )
.getAttributeType();
RenameAttributeTypeDialog dialog = new RenameAttributeTypeDialog( attributeType.getNames() );
if ( dialog.open() == RenameAttributeTypeDialog.OK )
{
MutableAttributeType modifiedAttributeType = PluginUtils.getClone( attributeType );
modifiedAttributeType.setNames( dialog.getAliases() );
Activator.getDefault().getSchemaHandler()
.modifyAttributeType( attributeType, modifiedAttributeType );
}
}
// OBJECT CLASS
else if ( selectedElement instanceof ObjectClassWrapper )
{
MutableObjectClass objectClass = ( MutableObjectClass ) ( ( ObjectClassWrapper ) selectedElement )
.getObjectClass();
RenameObjectClassDialog dialog = new RenameObjectClassDialog( objectClass.getNames() );
if ( dialog.open() == RenameObjectClassDialog.OK )
{
ObjectClass modifiedObjectClass = PluginUtils.getClone( objectClass );
modifiedObjectClass.setNames( dialog.getAliases() );
Activator.getDefault().getSchemaHandler()
.modifyObjectClass( objectClass, modifiedObjectClass );
}
}
}