Icon (final @NotNull PsiElement element, final int flags) { if (element instanceof PsiDirectory psiDirectory) { return getDirectoryIcon(psiDirectory.getVirtualFile(), psiDirectory.getProject()); } return null; }