void (@NotNull PsiElement element, PsiFile file) { if (file == null ? element.isValid() : file.isValid()) { final ItemPresentation presentation = ((NavigationItem)element).getPresentation(); myIcon = presentation == null ? null : presentation.getIcon(true); myPresentableText = presentation == null ? UsageViewUtil.createNodeText(element) : presentation.getPresentableText(); myLocationText = presentation == null ? null : StringUtil.nullize(presentation.getLocationString()); if (myIcon == null) { if (element instanceof PsiMetaOwner psiMetaOwner) { final PsiMetaData metaData = psiMetaOwner.getMetaData(); if (metaData instanceof PsiPresentableMetaData psiPresentableMetaData) { if (myIcon == null) myIcon = psiPresentableMetaData.getIcon(); } } else if (element instanceof PsiFile psiFile) { final VirtualFile virtualFile = psiFile.getVirtualFile(); if (virtualFile != null) { myIcon = VirtualFilePresentation.getIcon(virtualFile); } } } } }