Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CDT on hover show documentation

In JDT, if we hover any object, like a function, class, variable etc, eclipse shows the documentation in a tool tip. This documentation is also displayed when the code-assist window shows the possibilities.

However, CDT does not work like this. By default, it shows the code of the hovered object. There's a setting in Window -> Preferences -> C/C++ -> Editor -> Hovers, to choose Documentation to be displayed, but unfortunately it does not show anything. Also there's a project called libhover, but it seems it does not work with in-code doxygen comments.

Is there any solution to mimic JDT hover behavior in CDT?

like image 965
WonderCsabo Avatar asked May 24 '13 15:05

WonderCsabo


1 Answers

Install LinuxTools plugin to Eclipse C/C++ IDE

Help / Install New Software... / Add...
Name=Linux Tools
Location=http://download.eclipse.org/linuxtools/update-3.2

Check for updated LinuxTools location url here

Install following packages, restart Eclipse after it's done.

  • C/C++ Library API Documentation Hover Help
  • Libhover for Newlib Feature
  • Library Hover help for devhelp documentation

You should get tooltips for C standard library functions such as malloc, memset, printf. I just did this for Eclipse Luna (4.2.2) with MinGW-builds_64bit in Windows 7.

I don't know what happens in C++ projects I guess it needs Doxygen tricks which I am not familiar with.

like image 109
Whome Avatar answered Sep 22 '22 01:09

Whome