PsiElement (PsiManager psiManager, Object object, PsiElement element) { if (object instanceof PsiElement) { MdnSymbolDocumentation documentation = getDocumentation((PsiElement)object, element); if (documentation != null) { return (PsiElement)object; } } PsiElement result = doIfNotNull(findDescriptor(psiManager, object.toString(), element), PsiMetaData::getDeclaration); DocumentationProvider styleProvider = getStyleProvider(); if (result == null && styleProvider != null) { result = styleProvider.getDocumentationElementForLookupItem(psiManager, object, element); } if (result == null) { DocumentationProvider scriptProvider = getScriptDocumentationProvider(); if (scriptProvider != null) { result = scriptProvider.getDocumentationElementForLookupItem(psiManager, object, element); } } if (result == null && object instanceof String && element != null) { result = XmlDocumentationProvider.findDeclWithName((String)object, element); } return result; }