ItemPresentation () { if (getElement() instanceof PsiFileImpl) { ItemPresentation filePresent = ((PsiFileImpl)getElement()).getPresentation(); return filePresent != null ? filePresent : DUMMY_PRESENTATION; } if (getElement() instanceof NavigationItem) { final ItemPresentation itemPresent = ((NavigationItem)getElement()).getPresentation(); if (itemPresent != null) { return itemPresent; } } return DUMMY_PRESENTATION; }