Package de.f0rce.ace.enums
Enum AceCustomModeTokens
java.lang.Object
java.lang.Enum<AceCustomModeTokens>
de.f0rce.ace.enums.AceCustomModeTokens
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<AceCustomModeTokens>
,java.lang.constant.Constable
public enum AceCustomModeTokens extends java.lang.Enum<AceCustomModeTokens>
The following are the common tokens to
Ace Documentation:
https://github.com/ajaxorg/ace/wiki/Creating-or-Extending-an-Edit-Mode#common-tokens
AceTheme
taken from the TextMate manual. Note that
not all of these may have styling associated with them, depending on the AceTheme
used.
Ace Documentation:
https://github.com/ajaxorg/ace/wiki/Creating-or-Extending-an-Edit-Mode#common-tokens
- Author:
- David "F0rce" Dodlek
-
Nested Class Summary
-
Enum Constant Summary
Enum Constants Enum Constant Description COMMENT
for commentsCOMMENT_BLOCK
multi-line comments like/*
COMMENT_BLOCK_DOCUMENTATION
embedded documentationCOMMENT_LINE
line comments, we specialize further so that the type of comment start character(s) can be extracted from the scope.COMMENT_LINE_CHARACTER
other types of line commentsCOMMENT_LINE_DOUBLE_DASH
-- comment
COMMENT_LINE_DOUBLE_SLASH
// comment
COMMENT_LINE_NUMBER_SIGN
# comment
COMMENT_LINE_PERCENTAGE
% comment
CONSTANT
various forms of constantsCONSTANT_CHARACTER
those which represent characters, e.g.CONSTANT_CHARACTER_ESCAPE
escape sequences like\e
CONSTANT_LANGUAGE
constants (generally) provided by the language which are "special" liketrue
,false
,nil
,YES
,NO
, etc.CONSTANT_NUMERIC
those which represent numbers, e.g.CONSTANT_OTHER
other constants, e.g. colors in CSSENTITY
an entity refers to a larger part of the document, for example a chapter, class, function, or tag.ENTITY_NAME
we are naming the larger entityENTITY_NAME_FUNCTION
the name of a functionENTITY_NAME_SECTION
the name is the name of a section/headingENTITY_NAME_TAG
a tag nameENTITY_NAME_TYPE
the name of a type declaration or classENTITY_OTHER
other entitiesENTITY_OTHER_ATTRIBUTE_NAME
the name of an attribute (mainly in tags)ENTITY_OTHER_INHERITED_CLASS
the superclass/baseclass nameINVALID
stuff which is "invalid"INVALID_DEPRECATED
for deprecated stuff e.g. using an API function which is deprecated or using styling with strict HTMLINVALID_ILLEGAL
illegal, e.g. an ampersand or lower-than character in HTML (which is not part of an entity/tag)KEYWORD
keywords (when these do not fall into the other groups)KEYWORD_CONTROL
mainly related to flow control likecontinue
,while
,return
, etc.KEYWORD_OPERATOR
operators can either be textual (e.g.KEYWORD_OTHER
other keywordsMARKUP
this is for markup languages and generally applies to larger subsets of the textMARKUP_BOLD
bold text (text which is strong and similar should preferably be derived from this name)MARKUP_HEADING
a section headerMARKUP_ITALIC
italic text (text which is emphasized and similar should preferably be derived from this name)MARKUP_LIST
list itemsMARKUP_LIST_NUMBERED
numbered list itemsMARKUP_LIST_UNNUMBERED
unnumbered list itemsMARKUP_OTHER
other markup constructsMARKUP_QUOTE
quoted (sometimes block quoted) textMARKUP_RAW
text which is verbatim, e.g. code listings.MARKUP_UNDERLINE
underlined textMARKUP_UNDERLINE_LINK
this is for links, as a convenience this is derived fromMARKUP_UNDERLINE
so that if there is no theme rule which specifically targetsMARKUP_UNDERLINE_LINK
then it will inherit the underline styleSTORAGE
things relating to "storage"STORAGE_MODIFIER
a storage modifier likestatic
,final
,abstract
, etc.STORAGE_TYPE
the type of something,class
,function
,int
,var
, etc.STRING
stringsSTRING_DOUBLE
double quoted strings:"foo"
STRING_INTERPOLATED
strings which are "evaluated":`date`
,$(pwd)
STRING_OTHER
other types of quoting:$'shell'
,%s{...}
STRING_QUOTED
quoted stringsSTRING_REGEXP
regular expressions:/(\w+)/
STRING_SINGLE
single quoted strings:'foo'
STRING_TRIPLE
triple quoted strings:"""Python"""
STRING_UNQUOTED
for things like here-docs and here-stringsSUPPORT
things provided by a framework or librarySUPPORT_CLASS
when the framework/library provides classesSUPPORT_CONSTANT
constants (magic values) provided by the framework/librarySUPPORT_FUNCTION
functions provided by the framework/library.SUPPORT_OTHER
the above should be exhaustive, but for everything elseSUPPORT_TYPE
types provided by the framework/library, this is probably only used for languages derived from C, which hastypedef
(andstruct
).SUPPORT_VARIABLE
variables provided by the framework/library.VARIABLE
variables.VARIABLE_LANGUAGE
reserved language variables likethis
,super
,self
, etcVARIABLE_OTHER
other variables, like$some_variables
VARIABLE_PARAMETER
when the variable is declared as the parameter -
Method Summary
Modifier and Type Method Description static AceCustomModeTokens
findByToken(java.lang.String token)
Find the enum by it'sString
representation.java.lang.String
getToken()
Returns theString
representation of a token.static AceCustomModeTokens
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static AceCustomModeTokens[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
COMMENT
for comments -
COMMENT_LINE
line comments, we specialize further so that the type of comment start character(s) can be extracted from the scope. -
COMMENT_LINE_DOUBLE_SLASH
// comment
-
COMMENT_LINE_DOUBLE_DASH
-- comment
-
COMMENT_LINE_NUMBER_SIGN
# comment
-
COMMENT_LINE_PERCENTAGE
% comment
-
COMMENT_LINE_CHARACTER
other types of line comments -
COMMENT_BLOCK
multi-line comments like/* ... */
and<!-- ... -->
-
COMMENT_BLOCK_DOCUMENTATION
embedded documentation -
CONSTANT
various forms of constants -
CONSTANT_NUMERIC
those which represent numbers, e.g.42
,1.3f
,0x4AB1U
-
CONSTANT_CHARACTER
those which represent characters, e.g.<
,\e
,\031
-
CONSTANT_CHARACTER_ESCAPE
escape sequences like\e
-
CONSTANT_LANGUAGE
constants (generally) provided by the language which are "special" liketrue
,false
,nil
,YES
,NO
, etc. -
CONSTANT_OTHER
other constants, e.g. colors in CSS -
ENTITY
an entity refers to a larger part of the document, for example a chapter, class, function, or tag. We do not scope the entire entity asENTITY.*
(we useMETA.*
for that). But we do useentity.*
for the "placeholders" in the larger entity, e.g. if the entity is a chapter, we would useENTITY_NAME_SECTION
for the chapter title. -
ENTITY_NAME
we are naming the larger entity -
ENTITY_NAME_FUNCTION
the name of a function -
ENTITY_NAME_TYPE
the name of a type declaration or class -
ENTITY_NAME_TAG
a tag name -
ENTITY_NAME_SECTION
the name is the name of a section/heading -
ENTITY_OTHER
other entities -
ENTITY_OTHER_INHERITED_CLASS
the superclass/baseclass name -
ENTITY_OTHER_ATTRIBUTE_NAME
the name of an attribute (mainly in tags) -
INVALID
stuff which is "invalid" -
INVALID_ILLEGAL
illegal, e.g. an ampersand or lower-than character in HTML (which is not part of an entity/tag) -
INVALID_DEPRECATED
for deprecated stuff e.g. using an API function which is deprecated or using styling with strict HTML -
KEYWORD
keywords (when these do not fall into the other groups) -
KEYWORD_CONTROL
mainly related to flow control likecontinue
,while
,return
, etc. -
KEYWORD_OPERATOR
operators can either be textual (e.g.or
) or be characters -
KEYWORD_OTHER
other keywords -
MARKUP
this is for markup languages and generally applies to larger subsets of the text -
MARKUP_UNDERLINE
underlined text -
MARKUP_UNDERLINE_LINK
this is for links, as a convenience this is derived fromMARKUP_UNDERLINE
so that if there is no theme rule which specifically targetsMARKUP_UNDERLINE_LINK
then it will inherit the underline style -
MARKUP_BOLD
bold text (text which is strong and similar should preferably be derived from this name) -
MARKUP_HEADING
a section header -
MARKUP_ITALIC
italic text (text which is emphasized and similar should preferably be derived from this name) -
MARKUP_LIST
list items -
MARKUP_LIST_NUMBERED
numbered list items -
MARKUP_LIST_UNNUMBERED
unnumbered list items -
MARKUP_QUOTE
quoted (sometimes block quoted) text -
MARKUP_RAW
text which is verbatim, e.g. code listings. Normally spell checking is disabled forMARKUP_RAW
-
MARKUP_OTHER
other markup constructs -
STORAGE
things relating to "storage" -
STORAGE_TYPE
the type of something,class
,function
,int
,var
, etc. -
STORAGE_MODIFIER
a storage modifier likestatic
,final
,abstract
, etc. -
STRING
strings -
STRING_QUOTED
quoted strings -
STRING_SINGLE
single quoted strings:'foo'
-
STRING_DOUBLE
double quoted strings:"foo"
-
STRING_TRIPLE
triple quoted strings:"""Python"""
-
STRING_UNQUOTED
for things like here-docs and here-strings -
STRING_INTERPOLATED
strings which are "evaluated":`date`
,$(pwd)
-
STRING_REGEXP
regular expressions:/(\w+)/
-
STRING_OTHER
other types of quoting:$'shell'
,%s{...}
-
SUPPORT
things provided by a framework or library -
SUPPORT_FUNCTION
functions provided by the framework/library. For exampleNSLog
in Objective-C -
SUPPORT_CLASS
when the framework/library provides classes -
SUPPORT_TYPE
types provided by the framework/library, this is probably only used for languages derived from C, which hastypedef
(andstruct
). Most other languages would introduce new types as classes -
SUPPORT_CONSTANT
constants (magic values) provided by the framework/library -
SUPPORT_VARIABLE
variables provided by the framework/library. For exampleNSApp
in AppKit -
SUPPORT_OTHER
the above should be exhaustive, but for everything else -
VARIABLE
variables. Not all languages allow easy identification (and thus markup) of these -
VARIABLE_PARAMETER
when the variable is declared as the parameter -
VARIABLE_LANGUAGE
reserved language variables likethis
,super
,self
, etc -
VARIABLE_OTHER
other variables, like$some_variables
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getToken
public java.lang.String getToken()Returns theString
representation of a token.- Returns:
String
-
findByToken
Find the enum by it'sString
representation.- Parameters:
token
-String
- Returns:
AceCustomModeTokens
-