Package de.f0rce.ace.enums
Enum Class AceCustomModeTokens
- All Implemented Interfaces:
Serializable,Comparable<AceCustomModeTokens>,Constable
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
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionfor commentsmulti-line comments like/* ...embedded documentationline comments, we specialize further so that the type of comment start character(s) can be extracted from the scope.other types of line comments-- comment// comment# comment% commentvarious forms of constantsthose which represent characters, e.g.escape sequences like\econstants (generally) provided by the language which are "special" liketrue,false,nil,YES,NO, etc.those which represent numbers, e.g.other constants, e.g.an entity refers to a larger part of the document, for example a chapter, class, function, or tag.we are naming the larger entitythe name of a functionthe name is the name of a section/headinga tag namethe name of a type declaration or classother entitiesthe name of an attribute (mainly in tags)the superclass/baseclass namestuff which is "invalid"for deprecated stuff e.g.illegal, e.g.keywords (when these do not fall into the other groups)mainly related to flow control likecontinue,while,return, etc.operators can either be textual (e.g.other keywordsthis is for markup languages and generally applies to larger subsets of the textbold text (text which is strong and similar should preferably be derived from this name)a section headeritalic text (text which is emphasized and similar should preferably be derived from this name)list itemsnumbered list itemsunnumbered list itemsother markup constructsquoted (sometimes block quoted) texttext which is verbatim, e.g.underlined textthis is for links, as a convenience this is derived fromMARKUP_UNDERLINEso that if there is no theme rule which specifically targetsMARKUP_UNDERLINE_LINKthen it will inherit the underline stylethings relating to "storage"a storage modifier likestatic,final,abstract, etc.the type of something,class,function,int,var, etc.stringsdouble quoted strings:"foo"strings which are "evaluated":`date`,$(pwd)other types of quoting:$'shell',%s{...}quoted stringsregular expressions:/(\w+)/single quoted strings:'foo'triple quoted strings:"""Python"""for things like here-docs and here-stringsthings provided by a framework or librarywhen the framework/library provides classesconstants (magic values) provided by the framework/libraryfunctions provided by the framework/library.the above should be exhaustive, but for everything elsetypes provided by the framework/library, this is probably only used for languages derived from C, which hastypedef(andstruct).variables provided by the framework/library.variables.reserved language variables likethis,super,self, etcother variables, like$some_variableswhen the variable is declared as the parameter -
Method Summary
Modifier and TypeMethodDescriptionstatic AceCustomModeTokensfindByToken(String token) Find the enum by it'sStringrepresentation.getToken()Returns theStringrepresentation of a token.static AceCustomModeTokensReturns the enum constant of this class with the specified name.static AceCustomModeTokens[]values()Returns an array containing the constants of this enum class, 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_SECTIONfor 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_UNDERLINEso that if there is no theme rule which specifically targetsMARKUP_UNDERLINE_LINKthen 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 -
META_TAG
-
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 exampleNSLogin 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 exampleNSAppin 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 class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getToken
Returns theStringrepresentation of a token.- Returns:
String
-
findByToken
Find the enum by it'sStringrepresentation.- Parameters:
token-String- Returns:
AceCustomModeTokens
-