Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Linux Tools Project/Libhover/Developers Guide"
(New page: == Introduction == The Libhover plug-in from the Linux Tools project provides a common interface for supplying C and C++ hover help for libraries. The plug-in uses a CDT (C/C++ Developer...) |
|||
Line 22: | Line 22: | ||
*id - unique id for this extension (required)<br> | *id - unique id for this extension (required)<br> | ||
− | *name - name of the extension | + | *name - name of the extension |
− | *library - details of the library | + | *library - details of the library |
− | * | + | ** docs - URL location of external help documentation (optional) |
+ | ** location - location of libhover binary data (either URL or relative location to plug-in) (required) | ||
+ | ** name - name that will appear in the C/C++ Documentation page for this hover help (required) | ||
+ | ** type - one of (C, C++, or ASM) (required) |
Revision as of 19:31, 23 February 2011
Introduction
The Libhover plug-in from the Linux Tools project provides a common interface for supplying C and C++ hover help for libraries. The plug-in uses a CDT (C/C++ Developer Tools) Help extension to register itself with the CDT. When a C or C++ file is presented in the editor and a hover event occurs, the CDT will call the Libhover plug-in to get information. In turn, the Libhover plug-in supplies its own extension which allows the end-user to specify a set of valid hovers to use. Each hover library can be enabled or disabled for a C/C++ project via the Project->Properties->C/C++ General->Documentation page. There a list of the valid hovers are shown and the user can check or un-check them as desired. Note that Libhover help suppliers set the language of the hover help and so a C project will ignore any C++ hover libraries. For a C++ project, both C and C++ library hovers are valid so they will all appear on the Documentation page.
Libhover Extension
The Libhover plug-in adds a new org.eclipse.linuxtools.cdt.libhover.library extension to be used in a plug-in. Let's examine an example which specifies libhover help for the glibc C Library:
<extension id="library" name="Glibc C Library" point="org.eclipse.linuxtools.cdt.libhover.library"> <library docs="http://www.gnu.org/software/libc/manual/html_node/index.html" location="./data/glibc-2.7-2.libhover" name="glibc library" type="C"> </library> </extension>
Fields are as follows:
- id - unique id for this extension (required)
- name - name of the extension
- library - details of the library
- docs - URL location of external help documentation (optional)
- location - location of libhover binary data (either URL or relative location to plug-in) (required)
- name - name that will appear in the C/C++ Documentation page for this hover help (required)
- type - one of (C, C++, or ASM) (required)