ItemPresentation () { return new ItemPresentation() { private String getName() { PyFromImportStatement elt = PsiTreeUtil.getParentOfType(PyStarImportElementImpl.this, PyFromImportStatement.class); if (elt != null) { // always? who knows :) PyReferenceExpression imp_src = elt.getImportSource(); if (imp_src != null) { return PyPsiUtils.toPath(imp_src); } } return "<?>"; } @Override public String getPresentableText() { return getName(); } @Override public String getLocationString() { return "| " + "from " + getName() + " import *"; } @Override public Icon getIcon(final boolean open) { return null; } }; }