How to navigate PsiElement in dart documents?
Answered
MarkdownElementTypes.SHORT_REFERENCE_LINK -> {
if (node.text.startsWith("[") && node.text.endsWith("]")) {
val r = node.text.removeSuffix("]").removePrefix("[")
DocumentationManagerUtil.createHyperlink(sb, "link###$r", r, false, false)
} else {
sb.append(node.text)
}
}DocumentationManagerUtil.createHyperlink(sb, "link###$r", r, false, false), I used this function, and the generated HTML looks like this <a href="psi_element://link###State"><code>State</code></a> , It can be clicked, but it cannot display the corresponding document (No documentation found.), May I ask how to solve it?


Please sign in to leave a comment.
Are you trying to replace provided Dart documentation provider?
It seems the issue could be that
getDocumentationElementForLinkis not implemented inDartDocumentationProviderwhich is required to resolve such links to actual targets.