ItemPresentation (@NotNull final T variable) { return new ItemPresentation() { @Override public String getPresentableText() { //return PsiFormatUtil.formatVariable(variable, PsiFormatUtilBase.SHOW_TYPE, PsiSubstitutor.EMPTY); return variable.getName(); } @Override public String getLocationString() { return ""; } @Override public Icon getIcon(boolean open) { return variable.getIcon(0); } }; }