Intercept clicks in documentation popup?

Hi,

I've sucessfully implemented a com.intellij.lang.documentation.AbstractDocumentationProvider for a custom language plugin with https://github.com/holgerbrandl/r4intellij/blob/master/src/com/r4intellij/documentation/RDocumentationProvider.java

I basically redirect the custom language provided help into the popup, which looks like:



However, the links are not yet functional since they are relative to some base URL. It there some way to intercept clicks here to provide new help content programmatically?

Thanks,
Holger

0
2 comments

The links contained in the documentation your provider returns are expected to be in the form understood by DocumentationManager (if you get the links from external source, you'll need to convert them). See DocumentationManagerProtocol and implementation of DocumentationManager.navigateByLink method.

0
Avatar
Permanently deleted user

Thanks Dmitry for your help.

By providing `psi_element://` links in the documentation along with implementing `com.r4intellij.documentation.RDocumentationProvider#getDocumentationElementForLink` I can reroute/intercept  help-popup-clicks as needed. :-)

Best.
Holger

0

Please sign in to leave a comment.