@Override public Icon getIcon() { Icon icon = myIcon; if (icon == null) { PsiElement psiElement = getElement(); myIcon = icon = psiElement != null && psiElement.isValid() ? psiElement.getIcon(0) : null; } return icon; }
@Override public boolean isValid() { PsiElement element = getElement(); if (element == null || !element.isValid()) { return false; } for (UsageInfo usageInfo : getMergedInfos()) { if (usageInfo.getSegment() == null) return false; } return true; }