How do I specify which element is linked to in the documentation
Answered
You know, in Javadoc, you can link to another method. In a plugin of a custom language, how do I specify the documentation of which element to pull out when clicking on the linik?
Please sign in to leave a comment.
Hi Vincent,
You should use HTML links with a special protocol. Example:
Protocol constant:
com.intellij.codeInsight.documentation.DocumentationManagerProtocol.PSI_ELEMENT_PROTOCOLYou also need to implement
com.intellij.lang.documentation.DocumentationProvider#getDocumentationElementForLink, which will return a target element for a given link.