PsiField (@NonNls @Nullable String path, PsiElement element) { if (path == null) return null; @NonNls List<String> pathElements = StringUtil.split(path, "."); if (pathElements.size() < 2) return null; final int iconsClassNameIdx = ContainerUtil.lastIndexOf(pathElements, s -> s.endsWith(ICONS_CLASSNAME_SUFFIX)); if (iconsClassNameIdx == -1) return null; Module module = ModuleUtilCore.findModuleForPsiElement(element); if (module == null) return null; PsiClass iconClass = findIconClass(module, StringUtil.join(ContainerUtil.getFirstItems(pathElements, iconsClassNameIdx + 1), "."), iconsClassNameIdx != 0); if (iconClass == null) return null; for (int i = iconsClassNameIdx + 1; i < pathElements.size() - 1; i++) { iconClass = iconClass.findInnerClassByName(pathElements.get(i), false); if (iconClass == null) return null; } return iconClass.findFieldByName(pathElements.get(pathElements.size() - 1), false); }