1
|
dp.sh.Brushes.Java = function()
|
2
|
{
|
3
|
var keywords = 'abstract assert boolean break byte case catch char class const ' +
|
4
|
'continue default do double else enum extends ' +
|
5
|
'false final finally float for goto if implements import ' +
|
6
|
'instanceof int interface long native new null ' +
|
7
|
'package private protected public return ' +
|
8
|
'short static strictfp super switch synchronized this throw throws true ' +
|
9
|
'transient try void volatile while';
|
10
|
|
11
|
this.regexList = [
|
12
|
{ regex: dp.sh.RegexLib.SingleLineCComments, css: 'comment' }, // one line comments
|
13
|
{ regex: dp.sh.RegexLib.MultiLineCComments, css: 'comment' }, // multiline comments
|
14
|
{ regex: dp.sh.RegexLib.DoubleQuotedString, css: 'string' }, // strings
|
15
|
{ regex: dp.sh.RegexLib.SingleQuotedString, css: 'string' }, // strings
|
16
|
{ regex: new RegExp('\\b([\\d]+(\\.[\\d]+)?|0x[a-f0-9]+)\\b', 'gi'), css: 'number' }, // numbers
|
17
|
{ regex: new RegExp('(?!\\@interface\\b)\\@[\\$\\w]+\\b', 'g'), css: 'annotation' }, // annotation @anno
|
18
|
{ regex: new RegExp('\\@interface\\b', 'g'), css: 'keyword' }, // @interface keyword
|
19
|
{ regex: new RegExp(this.GetKeywords(keywords), 'gm'), css: 'keyword' } // java keyword
|
20
|
];
|
21
|
|
22
|
this.CssClass = 'dp-j';
|
23
|
}
|
24
|
|
25
|
dp.sh.Brushes.Java.prototype = new dp.sh.Highlighter();
|
26
|
dp.sh.Brushes.Java.Aliases = ['java'];
|