My language plugin never got run by CLion

This plugin worked in early clion eaps, but stopped working after several updates of clion.

Here's plugin.xml:

<idea-plugin version="2">




  <vendor email="" url=""></vendor>






  <!-- please see for description -->

  <idea-version since-build="131"/>

  <!-- please see

       on how to target different products -->



  <extensions defaultExtensionNs="com.intellij">

    <!-- Add your extensions here -->

      <documentationProvider  implementation="com.example.MyDocumentationProvider" />



    <!-- Add your application components here -->



    <!-- Add your project components here -->



    <!-- Add your actions here -->



Here's MyDocumentationProvider:

public class MyDocumentationProvider implements CidrDocumentationProvider {



    public String getQuickNavigateInfo(PsiElement psiElement, PsiElement psiElement2) {

        String test = "test";

        return test;



public List<String> getUrlFor(PsiElement psiElement, PsiElement psiElement1) {
    return super.getUrlFor(psiElement, psiElement1);

I tried to set a breakpoint inside "getQuickNavigateInfo" and press "Ctrl + Q" in clion, but it never paused. If I put another breakpoint inside getUrlFor(), it would break there.

I tried to extend "lang.documentationProvider" instead of "documentationProvider", but failed.

I tried to add order="first" to <documentationProvider></documentationProvider>, but failed either.


The code you have provided here will not compile, because CidrDocumentationProvider is a class, not an interface. You need to implement the base interface (com.intellij.lang.documentation.DocumentationProvider).

Also, the method called when you press Ctrl-Q is generateDoc(). getQuickNavigateInfo() is called when you press Ctrl and hover over a reference to an element. getUrlFor() is called when you use the View |  External Documentation action.


It seems not like this.
When I pressed Ctrl + Q, only getUrlFor() was called, twice. generateDoc() was not called.
Also, when I moved the cursor to an element with Ctrl pressed, getQuickNavigateInfo() was not called either. The hint pane jumped out directly.
There wasn't any item called "External Documentation action" under "View" menu.

Sorry for the error in my code. My local copy is complete and compiled successfully.


getUrlFor() will indeed be called; the external documenation takes precedence over generated documentation, so if it was possible to find a URL with external documentation, it will be used and generateDoc() will not be called.

Ctrl-hover will call getQuickNavigateInfo() when hovering over a reference. When hovering over a declaration, it will indeed show the "Show usages of ..." hint directly.

The "External documentation" action is not show in the menu when it is not available.


Sorry, but I still can't figure out why clion wouldn't pause at breakpoints inside getQuickNavigateInfo() and other member functions except getUrlFor().


If you just want to understand how the API works, you can run IntelliJ IDEA Community Edition under a debugger (with your plugin if you like) and see in detail which methods are called in which situations. If you want to accomplish something specific, please let us know what exactly you're trying to do.


Please sign in to leave a comment.