IDEA-88366 Code completion popup draws placeholder icon for entries which do not have icon at all

This commit is contained in:
peter
2012-07-09 17:28:04 +02:00
parent fac0000154
commit e52b13ade7
@@ -30,7 +30,6 @@ public class KeywordLookupItem extends LookupItem<PsiKeyword> implements TypedLo
public KeywordLookupItem(final PsiKeyword keyword, @NotNull PsiElement position) {
super(keyword, keyword.getText());
myPosition = position;
setBold();
}
@Override
@@ -43,6 +42,12 @@ public class KeywordLookupItem extends LookupItem<PsiKeyword> implements TypedLo
return getLookupString().hashCode();
}
@Override
public void renderElement(LookupElementPresentation presentation) {
presentation.setItemText(getLookupString());
presentation.setItemTextBold(true);
}
public PsiType getType() {
return FilterUtil.getKeywordItemType(myPosition, getLookupString());
}