mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-17 18:29:55 +09:00
BNU님의 code highlighter 에디터 컴포넌트 추가
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3079 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
15fad89c08
commit
0d9265990a
27 changed files with 945 additions and 0 deletions
26
modules/editor/components/code_highlighter/script/shBrushJava.js
vendored
Executable file
26
modules/editor/components/code_highlighter/script/shBrushJava.js
vendored
Executable file
|
|
@ -0,0 +1,26 @@
|
|||
dp.sh.Brushes.Java = function()
|
||||
{
|
||||
var keywords = 'abstract assert boolean break byte case catch char class const ' +
|
||||
'continue default do double else enum extends ' +
|
||||
'false final finally float for goto if implements import ' +
|
||||
'instanceof int interface long native new null ' +
|
||||
'package private protected public return ' +
|
||||
'short static strictfp super switch synchronized this throw throws true ' +
|
||||
'transient try void volatile while';
|
||||
|
||||
this.regexList = [
|
||||
{ regex: dp.sh.RegexLib.SingleLineCComments, css: 'dp-comment' }, // one line comments
|
||||
{ regex: dp.sh.RegexLib.MultiLineCComments, css: 'dp-comment' }, // multiline comments
|
||||
{ regex: dp.sh.RegexLib.DoubleQuotedString, css: 'dp-string' }, // strings
|
||||
{ regex: dp.sh.RegexLib.SingleQuotedString, css: 'dp-string' }, // strings
|
||||
{ regex: new RegExp('\\b([\\d]+(\\.[\\d]+)?|0x[a-f0-9]+)\\b', 'gi'), css: 'dp-number' }, // numbers
|
||||
{ regex: new RegExp('(?!\\@interface\\b)\\@[\\$\\w]+\\b', 'g'), css: 'dp-annotation' }, // annotation @anno
|
||||
{ regex: new RegExp('\\@interface\\b', 'g'), css: 'dp-keyword' }, // @interface keyword
|
||||
{ regex: new RegExp(this.GetKeywords(keywords), 'gm'), css: 'dp-keyword' } // java keyword
|
||||
];
|
||||
|
||||
this.CssClass = 'dp-j';
|
||||
}
|
||||
|
||||
dp.sh.Brushes.Java.prototype = new dp.sh.Highlighter();
|
||||
dp.sh.Brushes.Java.Aliases = ['java'];
|
||||
Loading…
Add table
Add a link
Reference in a new issue