Icon (boolean open) { final PsiElement element = getElement(); if (element != null) { int flags = Iconable.ICON_FLAG_READ_STATUS; if (!(element instanceof PsiFile) || !element.isWritable()) flags |= Iconable.ICON_FLAG_VISIBILITY; return element.getIcon(flags); } else { return null; } }