Search in sources :

Example 1 with BeanPropertyElement

use of com.intellij.psi.impl.beanProperties.BeanPropertyElement in project intellij-community by JetBrains.

the class JavaElementLookupRenderer method renderElement.

@Override
public void renderElement(final LookupItem item, final Object element, final LookupElementPresentation presentation) {
    presentation.setIcon(DefaultLookupItemRenderer.getRawIcon(item, presentation.isReal()));
    presentation.setItemText(PsiUtilCore.getName((PsiElement) element));
    presentation.setStrikeout(isToStrikeout(item));
    presentation.setTailText((String) item.getAttribute(LookupItem.TAIL_TEXT_ATTR), item.getAttribute(LookupItem.TAIL_TEXT_SMALL_ATTR) != null);
    PsiType type = ((BeanPropertyElement) element).getPropertyType();
    presentation.setTypeText(type == null ? null : type.getPresentableText());
}
Also used : BeanPropertyElement(com.intellij.psi.impl.beanProperties.BeanPropertyElement) PsiElement(com.intellij.psi.PsiElement) PsiType(com.intellij.psi.PsiType)

Aggregations

PsiElement (com.intellij.psi.PsiElement)1 PsiType (com.intellij.psi.PsiType)1 BeanPropertyElement (com.intellij.psi.impl.beanProperties.BeanPropertyElement)1