fix some db docs
[factor/jcg.git] / basis / xmode / modes / java.xml
blobd350cdc2d15974e47b9c8d766b2719636d6bd481
1 <?xml version="1.0"?>\r
2 \r
3 <!DOCTYPE MODE SYSTEM "xmode.dtd">\r
4 \r
5 <MODE>\r
6         <PROPS>\r
7                 <PROPERTY NAME="commentStart" VALUE="/*" />\r
8                 <PROPERTY NAME="commentEnd" VALUE="*/" />\r
9                 <PROPERTY NAME="lineComment" VALUE="//" />\r
10                 <PROPERTY NAME="wordBreakChars" VALUE=",+-=&lt;&gt;/?^&amp;*" />\r
12                 <!-- Auto indent -->\r
13                 <PROPERTY NAME="indentOpenBrackets" VALUE="{" />\r
14                 <PROPERTY NAME="indentCloseBrackets" VALUE="}" />\r
15                 <PROPERTY NAME="unalignedOpenBrackets" VALUE="(" />\r
16                 <PROPERTY NAME="unalignedCloseBrackets" VALUE=")" />\r
17                 <PROPERTY NAME="indentNextLine"\r
18                         VALUE="\s*(((if|while)\s*\(|else\s*|else\s+if\s*\(|for\s*\(.*\))[^{;]*)" />\r
19                 <PROPERTY NAME="unindentThisLine"\r
20                         VALUE="^.*(default:\s*|case.*:.*)$" />\r
21                 <PROPERTY NAME="electricKeys" VALUE=":" />\r
22         </PROPS>\r
23         <RULES ESCAPE="\"\r
24                 IGNORE_CASE="FALSE"\r
25                 HIGHLIGHT_DIGITS="TRUE"\r
26                 DIGIT_RE="(0[lL]?|[1-9]\d{0,9}(\d{0,9}[lL])?|0[xX]\p{XDigit}{1,8}(\p{XDigit}{0,8}[lL])?|0[0-7]{1,11}([0-7]{0,11}[lL])?|([0-9]+\.[0-9]*|\.[0-9]+)([eE][+-]?[0-9]+)?[fFdD]?|[0-9]+([eE][+-]?[0-9]+[fFdD]?|([eE][+-]?[0-9]+)?[fFdD]))">\r
28                 <!-- Silly comment -->\r
29                 <SEQ TYPE="COMMENT1">/**/</SEQ>\r
31                 <!-- Javadoc comment -->\r
32                 <SPAN TYPE="COMMENT3" DELEGATE="JAVADOC">\r
33                         <BEGIN>/**</BEGIN>\r
34                         <END>*/</END>\r
35                 </SPAN>\r
37                 <!-- Java comment (C style) -->\r
38                 <SPAN TYPE="COMMENT1">\r
39                         <BEGIN>/*</BEGIN>\r
40                         <END>*/</END>\r
41                 </SPAN>\r
43                 <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">\r
44                         <BEGIN>"</BEGIN>\r
45                         <END>"</END>\r
46                 </SPAN>\r
47                 <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">\r
48                         <BEGIN>'</BEGIN>\r
49                         <END>'</END>\r
50                 </SPAN>\r
52                 <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>\r
54                 <SEQ TYPE="OPERATOR">=</SEQ>\r
55                 <SEQ TYPE="OPERATOR">!</SEQ>\r
56                 <SEQ TYPE="OPERATOR">&gt;=</SEQ>\r
57                 <SEQ TYPE="OPERATOR">&lt;=</SEQ>\r
58                 <SEQ TYPE="OPERATOR">+</SEQ>\r
59                 <SEQ TYPE="OPERATOR">-</SEQ>\r
60                 <SEQ TYPE="OPERATOR">/</SEQ>\r
62                 <!-- workaround to stop "*" from being colorized\r
63                      in import statements. -->\r
64                 <SEQ TYPE="NULL">.*</SEQ>\r
66                 <SEQ TYPE="OPERATOR">*</SEQ>\r
67                 <SEQ TYPE="OPERATOR">&gt;</SEQ>\r
68                 <SEQ TYPE="OPERATOR">&lt;</SEQ>\r
69                 <SEQ TYPE="OPERATOR">%</SEQ>\r
70                 <SEQ TYPE="OPERATOR">&amp;</SEQ>\r
71                 <SEQ TYPE="OPERATOR">|</SEQ>\r
72                 <SEQ TYPE="OPERATOR">^</SEQ>\r
73                 <SEQ TYPE="OPERATOR">~</SEQ>\r
74                 <SEQ TYPE="OPERATOR">}</SEQ>\r
75                 <SEQ TYPE="OPERATOR">{</SEQ>\r
76                 <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR"\r
77                         AT_WHITESPACE_END="TRUE">:</MARK_PREVIOUS>\r
79                 <!-- Function calls -->\r
80                 <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>\r
81                 <SEQ TYPE="OPERATOR">)</SEQ>\r
83                 <!-- Annotation types -->\r
84                 <MARK_FOLLOWING TYPE="KEYWORD4">@</MARK_FOLLOWING>\r
86                 <KEYWORDS>\r
87                         <KEYWORD1>abstract</KEYWORD1>\r
88                         <KEYWORD1>break</KEYWORD1>\r
89                         <KEYWORD1>case</KEYWORD1>\r
90                         <KEYWORD1>catch</KEYWORD1>\r
91                         <KEYWORD1>continue</KEYWORD1>\r
92                         <KEYWORD1>default</KEYWORD1>\r
93                         <KEYWORD1>do</KEYWORD1>\r
94                         <KEYWORD1>else</KEYWORD1>\r
95                         <KEYWORD1>extends</KEYWORD1>\r
96                         <KEYWORD1>final</KEYWORD1>\r
97                         <KEYWORD1>finally</KEYWORD1>\r
98                         <KEYWORD1>for</KEYWORD1>\r
99                         <KEYWORD1>if</KEYWORD1>\r
100                         <KEYWORD1>implements</KEYWORD1>\r
101                         <KEYWORD1>instanceof</KEYWORD1>\r
102                         <KEYWORD1>native</KEYWORD1>\r
103                         <KEYWORD1>new</KEYWORD1>\r
104                         <KEYWORD1>private</KEYWORD1>\r
105                         <KEYWORD1>protected</KEYWORD1>\r
106                         <KEYWORD1>public</KEYWORD1>\r
107                         <KEYWORD1>return</KEYWORD1>\r
108                         <KEYWORD1>static</KEYWORD1>\r
109                         <KEYWORD1>switch</KEYWORD1>\r
110                         <KEYWORD1>synchronized</KEYWORD1>\r
111                         <KEYWORD1>throw</KEYWORD1>\r
112                         <KEYWORD1>throws</KEYWORD1>\r
113                         <KEYWORD1>transient</KEYWORD1>\r
114                         <KEYWORD1>try</KEYWORD1>\r
115                         <KEYWORD1>volatile</KEYWORD1>\r
116                         <KEYWORD1>while</KEYWORD1>\r
118                         <KEYWORD2>package</KEYWORD2>\r
119                         <KEYWORD2>import</KEYWORD2>\r
121                         <KEYWORD3>boolean</KEYWORD3>\r
122                         <KEYWORD3>byte</KEYWORD3>\r
123                         <KEYWORD3>char</KEYWORD3>\r
124                         <KEYWORD3>class</KEYWORD3>\r
125                         <KEYWORD3>double</KEYWORD3>\r
126                         <KEYWORD3>float</KEYWORD3>\r
127                         <KEYWORD3>int</KEYWORD3>\r
128                         <KEYWORD3>interface</KEYWORD3>\r
129                         <KEYWORD3>long</KEYWORD3>\r
130                         <KEYWORD3>short</KEYWORD3>\r
131                         <KEYWORD3>void</KEYWORD3>\r
133                         <FUNCTION>assert</FUNCTION>\r
134                         <KEYWORD1>strictfp</KEYWORD1>\r
137                         <LITERAL2>false</LITERAL2>\r
138                         <LITERAL2>null</LITERAL2>\r
139                         <LITERAL2>super</LITERAL2>\r
140                         <LITERAL2>this</LITERAL2>\r
141                         <LITERAL2>true</LITERAL2>\r
143                         <INVALID>goto</INVALID>\r
144                         <INVALID>const</INVALID>\r
146                         <!-- Java 1.5 -->\r
147                         <KEYWORD3>enum</KEYWORD3>\r
148                 </KEYWORDS>\r
149         </RULES>\r
151         <RULES SET="JAVADOC" DEFAULT="COMMENT3" IGNORE_CASE="TRUE">\r
153                 <!-- so that *@param is highlighted -->\r
154                 <SEQ TYPE="COMMENT3">*</SEQ>\r
156                 <!-- Javadoc ignores tags inside <pre> -->\r
157                 <!-- XXX no it doesn't -->\r
158                 <!-- SPAN TYPE="MARKUP" DELEGATE="JAVADOC_PRE">\r
159                         <BEGIN>&lt;pre&gt;</BEGIN>\r
160                         <END>&lt;/pre&gt;</END>\r
161                 </SPAN -->\r
163                 <!-- HTML comments -->\r
164                 <SPAN TYPE="COMMENT1">\r
165                         <BEGIN>&lt;!--</BEGIN>\r
166                         <END>--&gt;</END>\r
167                 </SPAN>\r
169                 <!-- Javadoc allows this -->\r
170                 <SEQ TYPE="COMMENT3">&lt;&lt;</SEQ>\r
171                 <SEQ TYPE="COMMENT3">&lt;=</SEQ>\r
172                 <SEQ TYPE="COMMENT3">&lt; </SEQ>\r
174                 <!-- HTML tags -->\r
175                 <SPAN TYPE="MARKUP" DELEGATE="xml::TAGS"\r
176                         NO_LINE_BREAK="TRUE">\r
177                         <BEGIN>&lt;</BEGIN>\r
178                         <END>&gt;</END>\r
179                 </SPAN>\r
181                 <!-- so that @link{...} is highlighted -->\r
182                 <!-- XXX: this is wrong, {@link ..} is correct, see below -->\r
183                 <!--<SEQ TYPE="COMMENT3">{</SEQ>-->\r
185                 <SPAN_REGEXP TYPE="LABEL" HASH_CHAR="{@" NO_WORD_BREAK="FALSE" DELEGATE="JAVADOC_PARAM">\r
186                         <BEGIN>\{@(link|linkplain|docRoot|code|literal)\s</BEGIN>\r
187                         <END>}</END>\r
188                 </SPAN_REGEXP>\r
190                 <!-- for the common usage of the cvs keyword $Id: java.xml 9228 2007-03-27 22:01:25Z ezust $ -->\r
191                 <SPAN_REGEXP TYPE="LABEL" HASH_CHAR="@version" NO_WORD_BREAK="FALSE" DELEGATE="JAVADOC_PARAM">\r
192                         <BEGIN>@version\s+\$</BEGIN>\r
193                         <END>$</END>\r
194                 </SPAN_REGEXP>\r
196                 <!-- This works only when you use the same whitespace before and after the param's name,\r
197                          eg. a tab before and after, but mixing space and tab won't work.\r
198                          The reason is that you can't enter a regexp in END, except for the backreference operator $n -->\r
199                 <SPAN_REGEXP TYPE="LABEL" HASH_CHAR="@" NO_WORD_BREAK="FALSE" DELEGATE="JAVADOC_PARAM">\r
200                         <BEGIN>@(?:param|throws|exception|serialField)(\s)</BEGIN>\r
201                         <END>$1</END>\r
202                 </SPAN_REGEXP>\r
204                 <KEYWORDS>\r
205                 <!-- Note: the labels in comments are handled by SPANs above -->\r
207                 <!-- Official javadoc tags:\r
208                          http://java.sun.com/j2se/1.5/docs/tooldocs/windows/javadoc.html#javadoctags -->\r
209                         <LABEL>@author</LABEL>\r
210                         <LABEL>@deprecated</LABEL>\r
211                 <!--<LABEL>@docRoot</LABEL>-->\r
212                 <!--<LABEL>@exception</LABEL>-->\r
213                         <LABEL>{@inheritDoc}</LABEL>\r
214                 <!--<LABEL>@link</LABEL>-->\r
215                 <!--<LABEL>@linkplain</LABEL>-->\r
216                 <!--<LABEL>@param</LABEL>-->\r
217                         <LABEL>@return</LABEL>\r
218                         <LABEL>@see</LABEL>\r
219                         <LABEL>@serial</LABEL>\r
220                         <LABEL>@serialData</LABEL>\r
221                 <!--<LABEL>@serialField</LABEL>-->\r
222                         <LABEL>@since</LABEL>\r
223                 <!--<LABEL>@throws</LABEL>-->\r
224                         <LABEL>{@value}</LABEL>\r
225                         <LABEL>@version</LABEL>\r
227                 <!-- new in 1.5 -->\r
228                 <!--<LABEL>@code</LABEL>-->\r
229                 <!--<LABEL>@literal</LABEL>-->\r
231                 <!-- SUNs proposed tags:\r
232                          http://java.sun.com/j2se/javadoc/proposed-tags.html -->\r
233                         <KEYWORD2>@category</KEYWORD2>\r
234                         <KEYWORD2>@example</KEYWORD2>\r
235                         <KEYWORD2>@exclude</KEYWORD2>\r
236                         <KEYWORD2>@index</KEYWORD2>\r
237                         <KEYWORD2>@internal</KEYWORD2>\r
238                         <KEYWORD2>@obsolete</KEYWORD2>\r
239                         <KEYWORD2>@threadsafety</KEYWORD2>\r
240                         <KEYWORD2>@tutorial</KEYWORD2>\r
241                         <KEYWORD2>@todo</KEYWORD2>\r
243                 <!-- Custom tags -->\r
244                         <KEYWORD4>@access</KEYWORD4>\r
245                         <KEYWORD4>@beaninfo</KEYWORD4>\r
246                         <KEYWORD4>@bon</KEYWORD4>\r
247                         <KEYWORD4>@bug</KEYWORD4>\r
248                         <KEYWORD4>@complexity</KEYWORD4>\r
249                         <KEYWORD4>@design</KEYWORD4>\r
250                         <KEYWORD4>@ensures</KEYWORD4>\r
251                         <KEYWORD4>@equivalent</KEYWORD4>\r
252                         <KEYWORD4>@generates</KEYWORD4>\r
253                         <KEYWORD4>@guard</KEYWORD4>\r
254                         <KEYWORD4>@hides</KEYWORD4>\r
255                         <KEYWORD4>@history</KEYWORD4>\r
256                         <KEYWORD4>@idea</KEYWORD4>\r
257                         <KEYWORD4>@invariant</KEYWORD4>\r
258                         <KEYWORD4>@modifies</KEYWORD4>\r
259                         <KEYWORD4>@overrides</KEYWORD4>\r
260                         <KEYWORD4>@post</KEYWORD4>\r
261                         <KEYWORD4>@pre</KEYWORD4>\r
262                         <KEYWORD4>@references</KEYWORD4>\r
263                         <KEYWORD4>@requires</KEYWORD4>\r
264                         <KEYWORD4>@review</KEYWORD4>\r
265                         <KEYWORD4>@spec</KEYWORD4>\r
266                         <KEYWORD4>@uses</KEYWORD4>\r
267                         <KEYWORD4>@values</KEYWORD4>\r
268                 </KEYWORDS>\r
269         </RULES>\r
271         <!-- just a dummy which makes use of the default token type COMMENT4 for highlighting the word after @param in javadoc -->\r
272         <RULES SET="JAVADOC_PARAM" DEFAULT="COMMENT4" IGNORE_CASE="TRUE" />\r
273 </MODE>\r