}
private void buildLookupElements(CompletionResultSet completionResultSet, QueryBuilderScopeContext collect) {
for(Map.Entry<String, QueryBuilderPropertyAlias> entry: collect.getPropertyAliasMap().entrySet()) {
DoctrineModelField field = entry.getValue().getField();
LookupElementBuilder lookup = LookupElementBuilder.create(entry.getKey());
lookup = lookup.withIcon(Symfony2Icons.DOCTRINE);
if(field != null) {
lookup = lookup.withTypeText(field.getTypeName(), true);
if(field.getRelationType() != null) {
lookup = lookup.withTailText("(" + field.getRelationType() + ")", true);
lookup = lookup.withTypeText(field.getRelation(), true);
lookup = lookup.withIcon(PhpIcons.CLASS_ICON);
} else {
// relation tail text wins
String column = field.getColumn();
if(column != null) {
lookup = lookup.withTailText("(" + column + ")", true);
}
}