PsiElement (Object element) { if (element instanceof String qName) { SourceScope scope = getSourceScope(); Project project = getConfiguration().getProject(); int idx = qName.indexOf(','); String className = idx > 0 ? qName.substring(0, idx) : qName; return DumbService.getInstance(project).computeWithAlternativeResolveEnabled(() -> JavaPsiFacade.getInstance(project).findClass(className, scope != null ? scope.getGlobalSearchScope() : GlobalSearchScope.projectScope(project))); } if (element instanceof Location) { return ((Location<?>)element).getPsiElement(); } return element instanceof PsiElement ? (PsiElement)element : null; }