cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE how to show hints when calling function

Mykola_Levun
Associate III

Hello,

STM32CubeIDE.

Is it possible to show hints (description of the function, description of the parameters of the function, description of the return value) when calling function?

I made this function (see Figure 1) and made documenting comment. When I calling this function or I hover the cursor over the function name a tooltip with the function code pops up, but I want to see description of the function (@brief parameter from documenting comment, see Figure 1).

Figure 1

Mykola_Levun_0-1725009010067.png

 

15 REPLIES 15

Doxygen is the C equivalent. Try with Doxygen - styled comments. This functionality comes from Eclipse CDT. If it doesn't work, check documentation & references on the Eclipse CDT. 

 


@Pavel A. wrote:

Doxygen is the C equivalent. Try with Doxygen - styled comments. This functionality comes from Eclipse CDT. If it doesn't work, check documentation & references on the Eclipse CDT. 

 


I'm not quite sure what you had in mind. Still, Doxygen is an external tool intended to generate standalone documentation (such as HTML or RTF files) from the Javadoc or Markstyle-style documentation comments in the source files. It has nothing to do with the Eclipse CDT except for the front-end plugin Eclox for easier configuration of the process of generation.
But hey, I don't know everything, so maybe you can share and point out particular parts of the Eclipse CDT documentation?

@Artur Laskowski I am not an expert in Eclipse but it seems like the editor can recognize comments in certain style,  and use these comments for functions and other definitions pop-ups. This works similarly for Java and C/C++.  It doesn't render documentation like the doxygen itself does. It's sufficient to detect the docu-comments /// or /**  immediately before the function definition.

 

OK, I see I missed one thing you mentioned, and I'm sorry about that: the Eclipse/STM32CubeIDE has a built-in option for easier generation of documentation comments, as shown in the screenshot.

ArturLaskowski_0-1776751618910.png

But still, it's only for creating documentation comments for external tool; I'm not able to force the STM32CubeIDE to create hover pop-ups with formatted documentation, as it's done in other IDEs. Below is a screen from VS Code.

ArturLaskowski_1-1776751764575.png

 

@Artur Laskowski do you see in CubeIDE unformatted function comment like below?

PavelA_0-1776784724050.png

This is behavior of Eclipse. CubeIDE just inherits it from the Eclipse CDT code base. It can be improved, anyone is welcome to contribute.

The source seems to be in org.eclipse.cdt.internal.ui.text.hover.CDeclarationHover; getHoverInfo():

https://github.com/eclipse-cdt/cdt/blob/main/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CSourceHover.java ~ line 723

 

Oh, I know that is inherited from Eclipse CDT. And I know that ST may resolve it on its own, similarly to some other issues inherited from the base Eclipse.

The ST is the publisher of this particular software, and I think they could do it by themselves.