PageRenderTime 74ms CodeModel.GetById 70ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/jEdit/tags/jedit-4-2-pre14/modes/java.xml

#
XML | 224 lines | 219 code | 3 blank | 2 comment | 0 complexity | aaa72c61a9b5d7ca57bd975d4e68e0fe MD5 | raw file
  1<?xml version="1.0"?>
  2
  3<!DOCTYPE MODE SYSTEM "xmode.dtd">
  4
  5<MODE>
  6	<PROPS>
  7		<PROPERTY NAME="commentStart" VALUE="/*" />
  8		<PROPERTY NAME="commentEnd" VALUE="*/" />
  9		<PROPERTY NAME="lineComment" VALUE="//" />
 10		<PROPERTY NAME="wordBreakChars" VALUE=",+-=&lt;&gt;/?^&amp;*" />
 11
 12		<!-- Auto indent -->
 13		<PROPERTY NAME="indentOpenBrackets" VALUE="{" />
 14		<PROPERTY NAME="indentCloseBrackets" VALUE="}" />
 15		<PROPERTY NAME="indentNextLine"
 16			VALUE="\s*(((if|while)\s*\(|else\s*|else\s+if\s*\(|for\s*\(.*\))[^{;]*)" />
 17		<!-- set this to 'true' if you want to use GNU coding style -->
 18		<PROPERTY NAME="doubleBracketIndent" VALUE="false" />
 19		<PROPERTY NAME="lineUpClosingBracket" VALUE="true" />
 20	</PROPS>
 21	<RULES ESCAPE="\"
 22		IGNORE_CASE="FALSE"
 23		HIGHLIGHT_DIGITS="TRUE"
 24		DIGIT_RE="(0x[[:xdigit:]]+[lL]?|[[:digit:]]+(e[[:digit:]]*)?[lLdDfF]?)">
 25
 26		<!-- Silly comment -->
 27		<SEQ TYPE="COMMENT1">/**/</SEQ>
 28
 29		<!-- Javadoc comment -->
 30		<SPAN TYPE="COMMENT3" DELEGATE="JAVADOC">
 31			<BEGIN>/**</BEGIN>
 32			<END>*/</END>
 33		</SPAN>
 34
 35		<!-- Java comment (C style) -->
 36		<SPAN TYPE="COMMENT1">
 37			<BEGIN>/*</BEGIN>
 38			<END>*/</END>
 39		</SPAN>
 40
 41		<SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
 42			<BEGIN>"</BEGIN>
 43			<END>"</END>
 44		</SPAN>
 45		<SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
 46			<BEGIN>'</BEGIN>
 47			<END>'</END>
 48		</SPAN>
 49
 50		<EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
 51
 52		<SEQ TYPE="OPERATOR">=</SEQ>
 53		<SEQ TYPE="OPERATOR">!</SEQ>
 54		<SEQ TYPE="OPERATOR">&gt;=</SEQ>
 55		<SEQ TYPE="OPERATOR">&lt;=</SEQ>
 56		<SEQ TYPE="OPERATOR">+</SEQ>
 57		<SEQ TYPE="OPERATOR">-</SEQ>
 58		<SEQ TYPE="OPERATOR">/</SEQ>
 59
 60		<!-- workaround to stop "*" from being colorized
 61		     in import statements. -->
 62		<SEQ TYPE="NULL">.*</SEQ>
 63
 64		<SEQ TYPE="OPERATOR">*</SEQ>
 65		<SEQ TYPE="OPERATOR">&gt;</SEQ>
 66		<SEQ TYPE="OPERATOR">&lt;</SEQ>
 67		<SEQ TYPE="OPERATOR">%</SEQ>
 68		<SEQ TYPE="OPERATOR">&amp;</SEQ>
 69		<SEQ TYPE="OPERATOR">|</SEQ>
 70		<SEQ TYPE="OPERATOR">^</SEQ>
 71		<SEQ TYPE="OPERATOR">~</SEQ>
 72		<SEQ TYPE="OPERATOR">}</SEQ>
 73		<SEQ TYPE="OPERATOR">{</SEQ>
 74		<MARK_PREVIOUS TYPE="LABEL" EXCLUDE_MATCH="TRUE"
 75			AT_WHITESPACE_END="TRUE">:</MARK_PREVIOUS>
 76
 77		<!-- Function calls -->
 78		<MARK_PREVIOUS TYPE="FUNCTION" EXCLUDE_MATCH="TRUE">(</MARK_PREVIOUS>
 79
 80		<!-- Annotation types -->
 81		<MARK_FOLLOWING TYPE="KEYWORD4">@</MARK_FOLLOWING>
 82
 83		<KEYWORDS>
 84			<KEYWORD1>abstract</KEYWORD1>
 85			<KEYWORD1>break</KEYWORD1>
 86			<KEYWORD1>case</KEYWORD1>
 87			<KEYWORD1>catch</KEYWORD1>
 88			<KEYWORD1>continue</KEYWORD1>
 89			<KEYWORD1>default</KEYWORD1>
 90			<KEYWORD1>do</KEYWORD1>
 91			<KEYWORD1>else</KEYWORD1>
 92			<KEYWORD1>extends</KEYWORD1>
 93			<KEYWORD1>final</KEYWORD1>
 94			<KEYWORD1>finally</KEYWORD1>
 95			<KEYWORD1>for</KEYWORD1>
 96			<KEYWORD1>if</KEYWORD1>
 97			<KEYWORD1>implements</KEYWORD1>
 98			<KEYWORD1>instanceof</KEYWORD1>
 99			<KEYWORD1>native</KEYWORD1>
100			<KEYWORD1>new</KEYWORD1>
101			<KEYWORD1>private</KEYWORD1>
102			<KEYWORD1>protected</KEYWORD1>
103			<KEYWORD1>public</KEYWORD1>
104			<KEYWORD1>return</KEYWORD1>
105			<KEYWORD1>static</KEYWORD1>
106			<KEYWORD1>switch</KEYWORD1>
107			<KEYWORD1>synchronized</KEYWORD1>
108			<KEYWORD1>throw</KEYWORD1>
109			<KEYWORD1>throws</KEYWORD1>
110			<KEYWORD1>transient</KEYWORD1>
111			<KEYWORD1>try</KEYWORD1>
112			<KEYWORD1>volatile</KEYWORD1>
113			<KEYWORD1>while</KEYWORD1>
114
115			<KEYWORD2>package</KEYWORD2>
116			<KEYWORD2>import</KEYWORD2>
117
118			<KEYWORD3>boolean</KEYWORD3>
119			<KEYWORD3>byte</KEYWORD3>
120			<KEYWORD3>char</KEYWORD3>
121			<KEYWORD3>class</KEYWORD3>
122			<KEYWORD3>double</KEYWORD3>
123			<KEYWORD3>float</KEYWORD3>
124			<KEYWORD3>int</KEYWORD3>
125			<KEYWORD3>interface</KEYWORD3>
126			<KEYWORD3>long</KEYWORD3>
127			<KEYWORD3>short</KEYWORD3>
128			<KEYWORD3>void</KEYWORD3>
129
130			<FUNCTION>assert</FUNCTION>
131			<KEYWORD1>strictfp</KEYWORD1>
132
133
134			<LITERAL2>false</LITERAL2>
135			<LITERAL2>null</LITERAL2>
136			<LITERAL2>super</LITERAL2>
137			<LITERAL2>this</LITERAL2>
138			<LITERAL2>true</LITERAL2>
139
140			<INVALID>goto</INVALID>
141			<INVALID>const</INVALID>
142
143			<!-- Java 1.5 -->
144			<KEYWORD3>enum</KEYWORD3>
145		</KEYWORDS>
146	</RULES>
147
148	<RULES SET="JAVADOC" DEFAULT="COMMENT3" IGNORE_CASE="TRUE">
149		<!-- so that @link{...} is highlighted -->
150		<SEQ TYPE="COMMENT3">{</SEQ>
151
152		<!-- so that *@param is highlighted -->
153		<SEQ TYPE="COMMENT3">*</SEQ>
154
155		<!-- Javadoc ignores tags inside <pre> -->
156		<!-- XXX no it doesn't -->
157		<!-- SPAN TYPE="MARKUP" DELEGATE="JAVADOC_PRE">
158			<BEGIN>&lt;pre&gt;</BEGIN>
159			<END>&lt;/pre&gt;</END>
160		</SPAN -->
161
162		<!-- HTML comments -->
163		<SPAN TYPE="COMMENT1">
164			<BEGIN>&lt;!--</BEGIN>
165			<END>--&gt;</END>
166		</SPAN>
167
168		<!-- Javadoc allows this -->
169		<SEQ TYPE="COMMENT3">&lt;&lt;</SEQ>
170		<SEQ TYPE="COMMENT3">&lt;=</SEQ>
171		<SEQ TYPE="COMMENT3">&lt; </SEQ>
172
173		<!-- HTML tags -->
174		<SPAN TYPE="MARKUP" DELEGATE="xml::TAGS"
175			NO_LINE_BREAK="TRUE">
176			<BEGIN>&lt;</BEGIN>
177			<END>&gt;</END>
178		</SPAN>
179
180		<KEYWORDS>
181			<LABEL>@author</LABEL>
182			<LABEL>@beaninfo</LABEL>
183			<LABEL>@history</LABEL>
184			<LABEL>@bug</LABEL>
185			<LABEL>@review</LABEL>
186			<LABEL>@todo</LABEL>
187			<LABEL>@idea</LABEL>
188			<LABEL>@pre</LABEL>
189			<LABEL>@requires</LABEL>
190			<LABEL>@post</LABEL>
191			<LABEL>@ensures</LABEL>
192			<LABEL>@generates</LABEL>
193			<LABEL>@modifies</LABEL>
194			<LABEL>@invariant</LABEL>
195			<LABEL>@exception</LABEL>
196			<LABEL>@hides</LABEL>
197			<LABEL>@overrides</LABEL>
198			<LABEL>@equivalent</LABEL>
199			<LABEL>@bon</LABEL>
200			<LABEL>@access</LABEL>
201			<LABEL>@example</LABEL>
202			<LABEL>@design</LABEL>
203			<LABEL>@serial</LABEL>
204			<LABEL>@references</LABEL>
205			<LABEL>@uses</LABEL>
206			<LABEL>@guard</LABEL>
207			<LABEL>@values</LABEL>
208			<LABEL>@complexity</LABEL>
209			<LABEL>@deprecated</LABEL>
210			<LABEL>@docRoot</LABEL>
211			<LABEL>@exception</LABEL>
212			<LABEL>@link</LABEL>
213			<LABEL>@param</LABEL>
214			<LABEL>@return</LABEL>
215			<LABEL>@see</LABEL>
216			<LABEL>@serialData</LABEL>
217			<LABEL>@serialField</LABEL>
218			<LABEL>@since</LABEL>
219			<LABEL>@throws</LABEL>
220			<LABEL>@version</LABEL>
221			<LABEL>@spec</LABEL>
222		</KEYWORDS>
223	</RULES>
224</MODE>