PageRenderTime 204ms CodeModel.GetById 197ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/jEdit/tags/jedit-4-1-pre5/modes/java.xml

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