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 COMMENTfor commentsCOMMENT_BLOCKmulti-line comments like/*COMMENT_BLOCK_DOCUMENTATIONembedded documentationCOMMENT_LINEline comments, we specialize further so that the type of comment start character(s) can be extracted from the scope.COMMENT_LINE_CHARACTERother types of line commentsCOMMENT_LINE_DOUBLE_DASH-- commentCOMMENT_LINE_DOUBLE_SLASH// commentCOMMENT_LINE_NUMBER_SIGN# commentCOMMENT_LINE_PERCENTAGE% commentCONSTANTvarious forms of constantsCONSTANT_CHARACTERthose which represent characters, e.g.CONSTANT_CHARACTER_ESCAPEescape sequences like\eCONSTANT_LANGUAGEconstants (generally) provided by the language which are "special" liketrue,false,nil,YES,NO, etc.CONSTANT_NUMERICthose which represent numbers, e.g.CONSTANT_OTHERother constants, e.g. colors in CSSENTITYan entity refers to a larger part of the document, for example a chapter, class, function, or tag.ENTITY_NAMEwe are naming the larger entityENTITY_NAME_FUNCTIONthe name of a functionENTITY_NAME_SECTIONthe name is the name of a section/headingENTITY_NAME_TAGa tag nameENTITY_NAME_TYPEthe name of a type declaration or classENTITY_OTHERother entitiesENTITY_OTHER_ATTRIBUTE_NAMEthe name of an attribute (mainly in tags)ENTITY_OTHER_INHERITED_CLASSthe superclass/baseclass nameINVALIDstuff which is "invalid"INVALID_DEPRECATEDfor deprecated stuff e.g. using an API function which is deprecated or using styling with strict HTMLINVALID_ILLEGALillegal, e.g. an ampersand or lower-than character in HTML (which is not part of an entity/tag)KEYWORDkeywords (when these do not fall into the other groups)KEYWORD_CONTROLmainly related to flow control likecontinue,while,return, etc.KEYWORD_OPERATORoperators can either be textual (e.g.KEYWORD_OTHERother keywordsMARKUPthis is for markup languages and generally applies to larger subsets of the textMARKUP_BOLDbold text (text which is strong and similar should preferably be derived from this name)MARKUP_HEADINGa section headerMARKUP_ITALICitalic text (text which is emphasized and similar should preferably be derived from this name)MARKUP_LISTlist itemsMARKUP_LIST_NUMBEREDnumbered list itemsMARKUP_LIST_UNNUMBEREDunnumbered list itemsMARKUP_OTHERother markup constructsMARKUP_QUOTEquoted (sometimes block quoted) textMARKUP_RAWtext which is verbatim, e.g. code listings.MARKUP_UNDERLINEunderlined textMARKUP_UNDERLINE_LINKthis 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 styleSTORAGEthings relating to "storage"STORAGE_MODIFIERa storage modifier likestatic,final,abstract, etc.STORAGE_TYPEthe type of something,class,function,int,var, etc.STRINGstringsSTRING_DOUBLEdouble quoted strings:"foo"STRING_INTERPOLATEDstrings which are "evaluated":`date`,$(pwd)STRING_OTHERother types of quoting:$'shell',%s{...}STRING_QUOTEDquoted stringsSTRING_REGEXPregular expressions:/(\w+)/STRING_SINGLEsingle quoted strings:'foo'STRING_TRIPLEtriple quoted strings:"""Python"""STRING_UNQUOTEDfor things like here-docs and here-stringsSUPPORTthings provided by a framework or librarySUPPORT_CLASSwhen the framework/library provides classesSUPPORT_CONSTANTconstants (magic values) provided by the framework/librarySUPPORT_FUNCTIONfunctions provided by the framework/library.SUPPORT_OTHERthe above should be exhaustive, but for everything elseSUPPORT_TYPEtypes provided by the framework/library, this is probably only used for languages derived from C, which hastypedef(andstruct).SUPPORT_VARIABLEvariables provided by the framework/library.VARIABLEvariables.VARIABLE_LANGUAGEreserved language variables likethis,super,self, etcVARIABLE_OTHERother variables, like$some_variablesVARIABLE_PARAMETERwhen the variable is declared as the parameter -
Method Summary
Modifier and Type Method Description static AceCustomModeTokensfindByToken(java.lang.String token)Find the enum by it'sStringrepresentation.java.lang.StringgetToken()Returns theStringrepresentation of a token.static AceCustomModeTokensvalueOf(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_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 -
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 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 theStringrepresentation of a token.- Returns:
String
-
findByToken
Find the enum by it'sStringrepresentation.- Parameters:
token-String- Returns:
AceCustomModeTokens
-