File: org.eclipse.linuxtools.cdt.libhover.library.exsd

package info (click to toggle)
eclipse-linuxtools 1.0.0-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 69,212 kB
  • sloc: java: 224,575; xml: 23,980; ansic: 15,426; python: 458; cpp: 279; sh: 251; makefile: 48
file content (217 lines) | stat: -rw-r--r-- 7,315 bytes parent folder | download | duplicates (2)
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>
         &lt;extension
           point=&quot;org.eclipse.linuxtools.cdt.libhover.library&quot;&gt;
     &lt;library
           name=&quot;GTK&quot;
           location=&quot;http://mywebsite/libhover/xml/gtk.xml&quot;
           type=&quot;C&quot;
           docs=&quot;http://gtk.org/docs/gtk.html&quot;/&gt;
&lt;/extension&gt;
      </documentation>
   </annotation>

   <annotation>
      <appinfo>
         <meta.section type="apiinfo"/>
      </appinfo>
      <documentation>
         XML files referenced must adhere to the following xml structure:
&lt;pre&gt;

&lt;!DOCTYPE descriptions [

  &lt;!ELEMENT descriptions (construct)*&gt;

  &lt;!ELEMENT construct (structure|function)*&gt;
  &lt;!ATTLIST construct
    id ID #REQUIRED
    type CDATA #REQUIRED
  &gt;

  &lt;!ELEMENT structure       (synopsis?, elements?)?&gt;

  &lt;!ELEMENT elements     (element*)&gt;

  &lt;!ELEMENT element (synopsis*)&gt;
  &lt;!ATTLIST element
    content CDATA #REQUIRED
  &gt;

  &lt;!ELEMENT synopsis     (#PCDATA)*&gt;

  &lt;!ELEMENT function     (prototype,headers?,synopsis)&gt;
  &lt;!ATTLIST function
    returntype CDATA #REQUIRED
  &gt;

  &lt;!ELEMENT prototype    (parameter+)?&gt;

  &lt;!ELEMENT parameter (#PCDATA)*&gt;
  &lt;!ATTLIST parameter
    content CDATA #REQUIRED
  &gt;

  &lt;!ELEMENT headers      (header+)?&gt;

  &lt;!ELEMENT header (#PCDATA)*&gt;
  &lt;!ATTLIST header
    filename CDATA #REQUIRED
  &gt;

]&gt;
&lt;/pre&gt;
Note that function names need to be prefixed by &quot;function-&quot;.  For example:
&lt;pre&gt;
&lt;descriptions&gt;
  &lt;construct id=&quot;function-atexit&quot; type=&quot;function&quot;&gt;
    &lt;function returntype=&quot;int&quot;&gt;
      &lt;prototype&gt;
        &lt;parameter content=&quot;void (*function) (void)&quot;/&gt;
      &lt;/prototype&gt;
      &lt;headers&gt;
        &lt;header filename = &quot;stdlib.h&quot;/&gt;
      &lt;/headers&gt;
        &lt;synopsis&gt;
        The &amp;lt;CODE&amp;gt;atexit&amp;lt;/CODE&amp;gt; function registers the function &amp;lt;VAR&amp;gt;function&amp;lt;/VAR&amp;gt; to be
         called at normal program termination.  The &amp;lt;VAR&amp;gt;function&amp;lt;/VAR&amp;gt; is called with
         no arguments.
         &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; The return value from &amp;lt;CODE&amp;gt;atexit&amp;lt;/CODE&amp;gt; is zero on success and nonzero if
         the function cannot be registered.
        &lt;/synopsis&gt;
    &lt;/function&gt;
  &lt;/construct&gt;
&lt;/descriptions&gt;
&lt;/pre&gt;

Also note that the synopsis is output as html.  To specify html tags, one needs to use &amp;amp;lt; and &amp;amp;gt; as delimeters in place of &quot;&amp;lt&quot; and &quot;&amp;gt&quot;. 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>