| <?xml version='1.0' encoding='UTF-8'?> |
| <!-- Schema file written by PDE --> |
| <schema targetNamespace="library" xmlns="http://www.w3.org/2001/XMLSchema"> |
| <annotation> |
| <appinfo> |
| <meta.schema plugin="library" id="org.eclipse.linuxtools.cdt.libhover.library" name="C/C++ Library Hover Specifier"/> |
| </appinfo> |
| <documentation> |
| This extension allows specification of a library hover file to use when editing C or C++ files under the CDT. |
| </documentation> |
| </annotation> |
| |
| <element name="extension"> |
| <annotation> |
| <appinfo> |
| <meta.element /> |
| </appinfo> |
| </annotation> |
| <complexType> |
| <sequence> |
| <element ref="library" minOccurs="1" maxOccurs="unbounded"/> |
| </sequence> |
| <attribute name="point" type="string" use="required"> |
| <annotation> |
| <documentation> |
| |
| </documentation> |
| </annotation> |
| </attribute> |
| <attribute name="id" type="string" use="required"> |
| <annotation> |
| <documentation> |
| Unique simple id for this extension (e.g. library). |
| </documentation> |
| </annotation> |
| </attribute> |
| <attribute name="name" type="string" use="required"> |
| <annotation> |
| <documentation> |
| Name of this library to hover. This name will be shown in the preference and property dialogs. |
| </documentation> |
| <appinfo> |
| <meta.attribute translatable="true"/> |
| </appinfo> |
| </annotation> |
| </attribute> |
| </complexType> |
| </element> |
| |
| <element name="library"> |
| <complexType> |
| <attribute name="name" type="string" use="required"> |
| <annotation> |
| <documentation> |
| Name of the library that the hover info is providing |
| </documentation> |
| </annotation> |
| </attribute> |
| <attribute name="location" type="string" use="required"> |
| <annotation> |
| <documentation> |
| Location of the binary file containing the serialized LibHoverInfo for the documentation: either an absolute file name or a URL |
| </documentation> |
| </annotation> |
| </attribute> |
| <attribute name="docs" type="string"> |
| <annotation> |
| <documentation> |
| URL of help documentation or empty. |
| </documentation> |
| </annotation> |
| </attribute> |
| <attribute name="type" use="required"> |
| <annotation> |
| <documentation> |
| Type of library that help is for. One of C, C++, or ASM |
| </documentation> |
| <appinfo> |
| <meta.attribute translatable="true"/> |
| </appinfo> |
| </annotation> |
| <simpleType> |
| <restriction base="string"> |
| <enumeration value="C"> |
| </enumeration> |
| <enumeration value="C++"> |
| </enumeration> |
| <enumeration value="ASM"> |
| </enumeration> |
| </restriction> |
| </simpleType> |
| </attribute> |
| </complexType> |
| </element> |
| |
| <annotation> |
| <appinfo> |
| <meta.section type="since"/> |
| </appinfo> |
| <documentation> |
| 1.0.0 |
| </documentation> |
| </annotation> |
| |
| <annotation> |
| <appinfo> |
| <meta.section type="examples"/> |
| </appinfo> |
| <documentation> |
| <extension |
| point="org.eclipse.linuxtools.cdt.libhover.library"> |
| <library |
| name="GTK" |
| location="http://mywebsite/libhover/xml/gtk.xml" |
| type="C" |
| docs="http://gtk.org/docs/gtk.html"/> |
| </extension> |
| </documentation> |
| </annotation> |
| |
| <annotation> |
| <appinfo> |
| <meta.section type="apiinfo"/> |
| </appinfo> |
| <documentation> |
| XML files referenced must adhere to the following xml structure: |
| <pre> |
| |
| <!DOCTYPE descriptions [ |
| |
| <!ELEMENT descriptions (construct)*> |
| |
| <!ELEMENT construct (structure|function)*> |
| <!ATTLIST construct |
| id ID #REQUIRED |
| type CDATA #REQUIRED |
| > |
| |
| <!ELEMENT structure (synopsis?, elements?)?> |
| |
| <!ELEMENT elements (element*)> |
| |
| <!ELEMENT element (synopsis*)> |
| <!ATTLIST element |
| content CDATA #REQUIRED |
| > |
| |
| <!ELEMENT synopsis (#PCDATA)*> |
| |
| <!ELEMENT function (prototype,headers?,synopsis)> |
| <!ATTLIST function |
| returntype CDATA #REQUIRED |
| > |
| |
| <!ELEMENT prototype (parameter+)?> |
| |
| <!ELEMENT parameter (#PCDATA)*> |
| <!ATTLIST parameter |
| content CDATA #REQUIRED |
| > |
| |
| <!ELEMENT headers (header+)?> |
| |
| <!ELEMENT header (#PCDATA)*> |
| <!ATTLIST header |
| filename CDATA #REQUIRED |
| > |
| |
| ]> |
| </pre> |
| Note that function names need to be prefixed by "function-". For example: |
| <pre> |
| <descriptions> |
| <construct id="function-atexit" type="function"> |
| <function returntype="int"> |
| <prototype> |
| <parameter content="void (*function) (void)"/> |
| </prototype> |
| <headers> |
| <header filename = "stdlib.h"/> |
| </headers> |
| <synopsis> |
| The &lt;CODE&gt;atexit&lt;/CODE&gt; function registers the function &lt;VAR&gt;function&lt;/VAR&gt; to be |
| called at normal program termination. The &lt;VAR&gt;function&lt;/VAR&gt; is called with |
| no arguments. |
| &lt;br&gt;&lt;br&gt; The return value from &lt;CODE&gt;atexit&lt;/CODE&gt; is zero on success and nonzero if |
| the function cannot be registered. |
| </synopsis> |
| </function> |
| </construct> |
| </descriptions> |
| </pre> |
| |
| Also note that the synopsis is output as html. To specify html tags, one needs to use &amp;lt; and &amp;gt; as delimeters in place of "&lt" and "&gt". In the previous example, VAR tags are used for variable references, CODE tags for the function name, and br tags for forcing paragraph breaks. All of these make the hover look more interesting when displayed. |
| </documentation> |
| </annotation> |
| |
| |
| <annotation> |
| <appinfo> |
| <meta.section type="copyright"/> |
| </appinfo> |
| <documentation> |
| /******************************************************************************* |
| * Copyright (c) 2008 Red Hat Inc. and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * Red Hat Inc. - initial API and implementation |
| *******************************************************************************/ |
| </documentation> |
| </annotation> |
| |
| </schema> |