return new String[0];
// compute the 5 best matches and only accept if score <= 5
ScoreKeeper<IEObjectDescription> tracker = new ScoreKeeper<IEObjectDescription>(5, false, 5);
// List<IEObjectDescription> metaphoneAlike = Lists.newArrayList();
final DoubleMetaphone encoder = new DoubleMetaphone();
final String metaphoneName = encoder.encode(currentName);
for(IEObjectDescription d : descs) {
EClass c = d.getEClass();
typeok: if(types != null && types.length > 0) {
for(EClass wanted : types)
if((wanted == c || wanted.isSuperTypeOf(c)))
break typeok;
continue;
}
// filter based on path visibility
if(searchPath.searchIndexOf(d) == -1)
continue; // not visible according to path
String candidateName = converter.toString(d.getName());
tracker.addScore(StringUtils.getLevenshteinDistance(currentName, candidateName), d);
String candidateMetaphone = encoder.encode(candidateName);
// metaphone matches are scored on the pronounciation distance
if(metaphoneName.equals(candidateMetaphone) //
||
candidateMetaphone.startsWith(metaphoneName) //
|| candidateMetaphone.endsWith(metaphoneName) //