PsiElement (Project project, @NotNull String qualifiedName) { final String[] parts = qualifiedName.split("#"); if (parts.length > 0) { final String fqn = parts[0]; final PsiClass psiClass = JavaPsiFacade.getInstance(project).findClass(fqn, GlobalSearchScope.projectScope(project)); if (psiClass != null) { if (parts.length == 2) { final String memberName = parts[1]; final PsiField field = psiClass.findFieldByName(memberName, false); if (field != null) { return field; } final PsiMethod[] methods = psiClass.findMethodsByName(memberName, false); if (methods.length > 0) { return methods[0]; } } return psiClass; } } return null; }