public abstract class AbstractJFlexCTokenMaker extends AbstractJFlexTokenMaker
Modifier and Type | Class and Description |
---|---|
protected class |
AbstractJFlexCTokenMaker.CStyleInsertBreakAction
Action that knows how to special-case inserting a newline in a
multi-line comment for languages like C and Java.
|
offsetShift, s, start
currentToken, firstToken, previousToken
Modifier | Constructor and Description |
---|---|
protected |
AbstractJFlexCTokenMaker() |
Modifier and Type | Method and Description |
---|---|
protected javax.swing.Action |
createInsertBreakAction()
Creates and returns the action to use when the user inserts a newline.
|
boolean |
getCurlyBracesDenoteCodeBlocks(int languageIndex)
Returns
true always as C-style languages use curly braces
to denote code blocks. |
javax.swing.Action |
getInsertBreakAction()
Returns an action to handle "insert break" key presses (i.e.
|
boolean |
getMarkOccurrencesOfTokenType(int type)
Returns whether tokens of the specified type should have "mark
occurrences" enabled for the current programming language.
|
boolean |
getShouldIndentNextLineAfter(Token t)
The default implementation returns
false always. |
yybegin, yybegin
addNullToken, addToken, addToken, addToken, createOccurrenceMarker, getClosestStandardTokenTypeForInternalType, getLanguageIndex, getLastTokenTypeOnLine, getLineCommentStartAndEnd, getNoTokensIdentifiedYet, getOccurrenceMarker, isIdentifierChar, isMarkupLanguage, resetTokenList, setLanguageIndex
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getTokenList
protected javax.swing.Action createInsertBreakAction()
getInsertBreakAction()
public boolean getCurlyBracesDenoteCodeBlocks(int languageIndex)
true
always as C-style languages use curly braces
to denote code blocks.getCurlyBracesDenoteCodeBlocks
in interface TokenMaker
getCurlyBracesDenoteCodeBlocks
in class TokenMakerBase
languageIndex
- The language index at the offset in question.
Since some TokenMaker
s effectively have nested
languages (such as JavaScript in HTML), this parameter tells the
TokenMaker
what sub-language to look at.true
always.public javax.swing.Action getInsertBreakAction()
getInsertBreakAction
in interface TokenMaker
getInsertBreakAction
in class TokenMakerBase
public boolean getMarkOccurrencesOfTokenType(int type)
TokenMakerBase
TokenTypes.IDENTIFIER
.
Subclasses can override this method to support other token types, such
as TokenTypes.VARIABLE
.getMarkOccurrencesOfTokenType
in interface TokenMaker
getMarkOccurrencesOfTokenType
in class TokenMakerBase
type
- The token type.public boolean getShouldIndentNextLineAfter(Token t)
TokenMakerBase
false
always. Languages
that wish to better support auto-indentation can override this method.getShouldIndentNextLineAfter
in interface TokenMaker
getShouldIndentNextLineAfter
in class TokenMakerBase
t
- The token the previous line ends with.