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, startcurrentToken, 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, yybeginaddNullToken, addToken, addToken, addToken, createOccurrenceMarker, getClosestStandardTokenTypeForInternalType, getLanguageIndex, getLastTokenTypeOnLine, getLineCommentStartAndEnd, getOccurrenceMarker, isIdentifierChar, isMarkupLanguage, resetTokenList, setLanguageIndexclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetTokenListprotected 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 TokenMakergetCurlyBracesDenoteCodeBlocks in class TokenMakerBaselanguageIndex - The language index at the offset in question.
Since some TokenMakers 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 TokenMakergetInsertBreakAction in class TokenMakerBasepublic boolean getMarkOccurrencesOfTokenType(int type)
TokenTypes.IDENTIFIER.
Subclasses can override this method to support other token types, such
as TokenTypes.VARIABLE.getMarkOccurrencesOfTokenType in interface TokenMakergetMarkOccurrencesOfTokenType in class TokenMakerBasetype - The token type.public boolean getShouldIndentNextLineAfter(Token t)
false always. Languages
that wish to better support auto-indentation can override this method.getShouldIndentNextLineAfter in interface TokenMakergetShouldIndentNextLineAfter in class TokenMakerBaset - The token the previous line ends with.