In this short article I show you how to enable one of the hidden gems in Eclipse: how to get a description of the library function used in the code
Eclipse is great helping me writing code. One of the shortcuts I use most is <CTRL>+Space for ‘Code Completion’ which gives me suggestions what to write or complete:
It would be great if it could give me some more information about that function? Actually this is possible:
All what it needs is to install the Libhover plugins from the Eclipse Linux Tools project. The Eclipse Linux project is mostly used for Linux (hence the name), but some plugins are usable for any other embedded development.
To install it, use the menu Help > Install New Software and point to the following update site:
and install the following three plugins
- C/C++ Library API Documentation Hover Help
- Libhover for Newlib Feature
- Library Hover help for devhelp documentation
After a restart of the IDE, I can use the feature, such as moving the mouse cursor over a library call:
Pressing F2 or clicking into the hover let me scroll down to see the full description including examples.
💡 The plugin includes documentation for the newlib library, and the plugin documentation explains how more information or libraries could be added.
Happy Hovering 🙂
- Libhover project: https://www.eclipse.org/linuxtools/projectPages/libhover/
- Developer Guide: https://wiki.eclipse.org/Linux_Tools_Project/Libhover/Developers_Guide