added java lang classes as support.function
This commit is contained in:
parent
f40f50f5c7
commit
5c9071afd3
1 changed files with 34 additions and 1 deletions
|
|
@ -27,7 +27,36 @@ var JavaHighlightRules = function() {
|
||||||
("null|Infinity|NaN|undefined").split("|")
|
("null|Infinity|NaN|undefined").split("|")
|
||||||
);
|
);
|
||||||
|
|
||||||
|
var langClasses = lang.arrayToMap(
|
||||||
|
("AbstractMethodError|AssertionError|ClassCircularityError|"+
|
||||||
|
"ClassFormatError|Deprecated|EnumConstantNotPresentException|"+
|
||||||
|
"ExceptionInInitializerError|IllegalAccessError|"+
|
||||||
|
"IllegalThreadStateException|InstantiationError|InternalError|"+
|
||||||
|
"NegativeArraySizeException|NoSuchFieldError|Override|Process|"+
|
||||||
|
"ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|"+
|
||||||
|
"SuppressWarnings|TypeNotPresentException|UnknownError|"+
|
||||||
|
"UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|"+
|
||||||
|
"InstantiationException|IndexOutOfBoundsException|"+
|
||||||
|
"ArrayIndexOutOfBoundsException|CloneNotSupportedException|"+
|
||||||
|
"NoSuchFieldException|IllegalArgumentException|NumberFormatException|"+
|
||||||
|
"SecurityException|Void|InheritableThreadLocal|IllegalStateException|"+
|
||||||
|
"InterruptedException|NoSuchMethodException|IllegalAccessException|"+
|
||||||
|
"UnsupportedOperationException|Enum|StrictMath|Package|Compiler|"+
|
||||||
|
"Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|"+
|
||||||
|
"NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|"+
|
||||||
|
"NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|"+
|
||||||
|
"Character|Boolean|StackTraceElement|Appendable|StringBuffer|"+
|
||||||
|
"Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|"+
|
||||||
|
"StackOverflowError|OutOfMemoryError|VirtualMachineError|"+
|
||||||
|
"ArrayStoreException|ClassCastException|LinkageError|"+
|
||||||
|
"NoClassDefFoundError|ClassNotFoundException|RuntimeException|"+
|
||||||
|
"Exception|ThreadDeath|Error|Throwable|System|ClassLoader|"+
|
||||||
|
"Cloneable|Class|CharSequence|Comparable|String|Object").split("|")
|
||||||
|
);
|
||||||
|
|
||||||
|
var importClasses = lang.arrayToMap(
|
||||||
|
("").split("|")
|
||||||
|
);
|
||||||
// regexp must not have capturing parentheses. Use (?:) instead.
|
// regexp must not have capturing parentheses. Use (?:) instead.
|
||||||
// regexps are ordered -> the first match is used
|
// regexps are ordered -> the first match is used
|
||||||
|
|
||||||
|
|
@ -70,6 +99,10 @@ var JavaHighlightRules = function() {
|
||||||
return "variable.language";
|
return "variable.language";
|
||||||
else if (keywords.hasOwnProperty(value))
|
else if (keywords.hasOwnProperty(value))
|
||||||
return "keyword";
|
return "keyword";
|
||||||
|
else if (langClasses.hasOwnProperty(value))
|
||||||
|
return "support.function";
|
||||||
|
else if (importClasses.hasOwnProperty(value))
|
||||||
|
return "support.function";
|
||||||
else if (buildinConstants.hasOwnProperty(value))
|
else if (buildinConstants.hasOwnProperty(value))
|
||||||
return "constant.language";
|
return "constant.language";
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue