{
for ( String possibleMatchingRule : possibleMatchingRules.keySet() )
{
if ( possibleMatchingRule.toUpperCase().startsWith( matchingRule.toUpperCase() ) )
{
MatchingRule description = schema.getMatchingRuleDescription( possibleMatchingRule );
String replacementString = possibleMatchingRule;
if ( equalsColonToken == null )
{
replacementString += ":"; //$NON-NLS-1$
}
if ( equalsToken == null )
{
replacementString += "="; //$NON-NLS-1$
}
String displayString = possibleMatchingRule;
if ( displayString.equals( description.getOid() ) )
{
displayString += " (" + SchemaUtils.toString( description ) + ")"; //$NON-NLS-1$ //$NON-NLS-2$
}
else
{
displayString += " (" + description.getOid() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
}
String info = SchemaUtils.getLdifLine( description );
ICompletionProposal proposal = new CompletionProposal( replacementString, offset, matchingRule
.length(), replacementString.length(), getMatchingRuleImage(), displayString, null, info );
proposalList.add( proposal );