CDT悬停显示文档 [英] CDT on hover show documentation
问题描述
在JDT中,如果我们悬停任何对象,如函数,类,变量等,eclipse将显示文档中的工具提示。当代码辅助窗口显示可能性时,还会显示此文档。
但是,CDT不会像这样工作。默认情况下,它显示了悬停对象的代码。在窗口中有一个设置 - >偏好 - > C / C ++ - >编辑 - > Hovers
,以选择要显示的文档
,但不幸的是它没有显示任何内容。还有一个名为 libhover 的项目,但它似乎不适用于代码中doxygen注释。
有没有解决方案来模拟CDT中的JDT悬停行为?
将LinuxTools插件安装到Eclipse C / C ++ IDE中
帮助/安装新软件... /添加...
名称= Linux工具
位置= http://download.eclipse.org/linuxtools/update-3.2
安装以下软件包,完成之后重新启动Eclipse。
- C / C ++图书馆API文档悬停帮助
- Newlib功能的Libhover
- 用于devhelp文档的库移动器帮助
您应该获得C标准库的工具提示功能如malloc,memset,printf。我刚刚在Windows 7中使用了 MinGW-builds_64bit 的Eclipse Luna(4.2.2)。 p>
我不知道C ++项目中发生了什么,我猜想我需要Doxygen技巧,我不熟悉。
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?
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.
这篇关于CDT悬停显示文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!