{
if ( schema != null )
{
for ( String possibleObjectClass : possibleObjectClasses.keySet() )
{
ObjectClassDescription description = possibleObjectClasses.get( possibleObjectClass );
if ( possibleObjectClass.toUpperCase().startsWith( objectClass.toUpperCase() ) )
{
String replacementString = possibleObjectClass;
String displayString = possibleObjectClass;
if ( displayString.equals( description.getNumericOid() ) )
{
displayString += " (" + SchemaUtils.toString( description ) + ")"; //$NON-NLS-1$ //$NON-NLS-2$
}
else
{
displayString += " (" + description.getNumericOid() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
}
ICompletionProposal proposal = new CompletionProposal( replacementString, offset, objectClass
.length(), replacementString.length(), getObjectClassImage(), displayString, null, SchemaUtils
.getLdifLine( schema.getObjectClassDescription( possibleObjectClass ) ) );