Class LessTokenMaker
- java.lang.Object
-
- org.fife.ui.rsyntaxtextarea.TokenMakerBase
-
- org.fife.ui.rsyntaxtextarea.AbstractJFlexTokenMaker
-
- org.fife.ui.rsyntaxtextarea.AbstractJFlexCTokenMaker
-
- org.fife.ui.rsyntaxtextarea.modes.CSSTokenMaker
-
- org.fife.ui.rsyntaxtextarea.modes.LessTokenMaker
-
- All Implemented Interfaces:
TokenMaker
public class LessTokenMaker extends CSSTokenMaker
Scanner for Less files.- Version:
- 1.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.fife.ui.rsyntaxtextarea.AbstractJFlexCTokenMaker
AbstractJFlexCTokenMaker.CStyleInsertBreakAction
-
-
Field Summary
-
Fields inherited from class org.fife.ui.rsyntaxtextarea.modes.CSSTokenMaker
CSS_C_STYLE_COMMENT, CSS_CHAR_LITERAL, CSS_PROPERTY, CSS_STRING, CSS_VALUE, INTERNAL_CSS_CHAR, INTERNAL_CSS_MLC, INTERNAL_CSS_PROPERTY, INTERNAL_CSS_STRING, INTERNAL_CSS_VALUE, LESS_EOL_COMMENT, YYEOF, YYINITIAL
-
Fields inherited from class org.fife.ui.rsyntaxtextarea.AbstractJFlexTokenMaker
offsetShift, s, start
-
Fields inherited from class org.fife.ui.rsyntaxtextarea.TokenMakerBase
currentToken, firstToken, previousToken
-
-
Constructor Summary
Constructors Constructor Description LessTokenMaker()
Constructor; overridden to enable the niceties added by Less.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]
getLineCommentStartAndEnd(int languageIndex)
Returns the text to place at the beginning and end of a line to "comment" it in this programming language.boolean
getMarkOccurrencesOfTokenType(int type)
Returns whether tokens of the specified type should have "mark occurrences" enabled for the current programming language.-
Methods inherited from class org.fife.ui.rsyntaxtextarea.modes.CSSTokenMaker
addToken, getClosestStandardTokenTypeForInternalType, getCurlyBracesDenoteCodeBlocks, getShouldIndentNextLineAfter, getTokenList, isIdentifierChar, setHighlightingLess, yybegin, yycharat, yyclose, yylength, yylex, yypushback, yyreset, yystate, yytext
-
Methods inherited from class org.fife.ui.rsyntaxtextarea.AbstractJFlexCTokenMaker
createInsertBreakAction, getCurlyBracesDenoteCodeBlocks, getInsertBreakAction
-
Methods inherited from class org.fife.ui.rsyntaxtextarea.AbstractJFlexTokenMaker
yybegin
-
Methods inherited from class org.fife.ui.rsyntaxtextarea.TokenMakerBase
addNullToken, addToken, addToken, createOccurrenceMarker, getLanguageIndex, getLastTokenTypeOnLine, getNoTokensIdentifiedYet, getOccurrenceMarker, isMarkupLanguage, resetTokenList, setLanguageIndex
-
-
-
-
Method Detail
-
getLineCommentStartAndEnd
public java.lang.String[] getLineCommentStartAndEnd(int languageIndex)
Description copied from interface:TokenMaker
Returns the text to place at the beginning and end of a line to "comment" it in this programming language.- Specified by:
getLineCommentStartAndEnd
in interfaceTokenMaker
- Overrides:
getLineCommentStartAndEnd
in classCSSTokenMaker
- Parameters:
languageIndex
- The language index at the offset in question. Since someTokenMaker
s effectively have nested languages (such as JavaScript in HTML), this parameter tells theTokenMaker
what sub-language to look at.- Returns:
- The start and end strings to add to a line to "comment"
it out. A
null
value for either means there is no string to add for that part. A value ofnull
for the array means this language does not support commenting/uncommenting lines.
-
getMarkOccurrencesOfTokenType
public boolean getMarkOccurrencesOfTokenType(int type)
Description copied from class:TokenMakerBase
Returns whether tokens of the specified type should have "mark occurrences" enabled for the current programming language. The default implementation returns true if type isTokenTypes.IDENTIFIER
. Subclasses can override this method to support other token types, such asTokenTypes.VARIABLE
.- Specified by:
getMarkOccurrencesOfTokenType
in interfaceTokenMaker
- Overrides:
getMarkOccurrencesOfTokenType
in classCSSTokenMaker
- Parameters:
type
- The token type.- Returns:
- Whether tokens of this type should have "mark occurrences" enabled.
-
-