1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217
|
<?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>
|