Skip to main content
Jump to: navigation, search

Linux Tools Project/Libhover/Developers Guide

< Linux Tools Project
Revision as of 18:29, 23 February 2011 by Jjohnstn.redhat.com (Talk | contribs) (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...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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

Back to the top