ItemPresentation (@NotNull final PsiField psiField) { return new ColoredItemPresentation() { @Override public String getPresentableText() { return psiField.getName(); } @Override public TextAttributesKey getTextAttributesKey() { try { if (psiField.isDeprecated()) { return CodeInsightColors.DEPRECATED_ATTRIBUTES; } } catch (IndexNotReadyException ignore) { } return null; } @Override public String getLocationString() { return getJavaSymbolContainerText(psiField); } @Override public Icon getIcon(boolean open) { return psiField.getIcon(Iconable.ICON_FLAG_VISIBILITY); } }; }