Method Summary |
|
public boolean | canInsertToken(TokenItem beforeToken) Delegation to the same method in format-writer. |
public boolean | canModifyWhitespace(TokenItem inToken) Check whether the given token enables modifying of a whitespace in it. |
public boolean | canRemoveToken(TokenItem token) Whether the token-item can be removed. |
public boolean | canReplaceToken(TokenItem token) Whether the given token can be replaced or not. |
public String | chainToString(TokenItem token) Debug the current state of the chain.
Parameters: token - mark this token as current one. |
public String | chainToString(TokenItem token, int maxDocumentTokens) |
public FormatTokenPosition | changeLineIndent(FormatTokenPosition pos, int indent) Change the indentation of the line. |
public boolean | expandTabs() |
public TokenItem | findFirstToken(TokenItem token) Get the first token in chain. |
public FormatTokenPosition | findLineEnd(FormatTokenPosition pos) Get the ending position of the line. |
public FormatTokenPosition | findLineEndWhitespace(FormatTokenPosition pos) Return the ending whitespace on the line or null if there's no such token
on the given line. |
public FormatTokenPosition | findLineFirstNonWhitespace(FormatTokenPosition pos) Return the first non-whitespace character on the line or null if there is
no non-WS char on the line. |
public FormatTokenPosition | findLineStart(FormatTokenPosition pos) Get the starting position of the line. |
public FormatTokenPosition | findNextEOL(FormatTokenPosition pos) Get the first EOL in forward direction.
Parameters: pos - starting token-position that is ignored by the search so itcan be even EOL. |
public TokenItem | findNonEmptyToken(TokenItem token, boolean backward) Check whether the given token has empty text and if so start searching
for token with non-empty text in the given direction. |
public FormatTokenPosition | findNonWhitespace(FormatTokenPosition startPosition, FormatTokenPosition limitPosition, boolean stopOnEOL, boolean backward) Get the first non-whitespace position in the given direction.
Parameters: startPosition - position at which the search starts. |
public FormatTokenPosition | findPreviousEOL(FormatTokenPosition pos) Get the first EOL in backward direction. |
public FormatTokenPosition | getFormatStartPosition() Delegation to the same method in format-writer. |
public FormatWriter | getFormatWriter() Getter for the format-writer associated with this format-support. |
public int | getIndentShift() Delegation to the same method in format-writer. |
public String | getIndentString(int indent) This delegates to the same method in formatter. |
public FormatTokenPosition | getLastPosition() |
public TokenItem | getLastToken() Delegation to the same method in format-writer. |
public int | getLineIndent(FormatTokenPosition pos, boolean zeroForWSLine) Get the indentation of the line.
Parameters: formatTokenPosition - any position on the line. |
public FormatTokenPosition | getNextPosition(TokenItem token, int offset, Position.Bias bias) Get the next position of the position given by parameters. |
public FormatTokenPosition | getNextPosition(FormatTokenPosition pos) Get the next successive token-position after the given one. |
public FormatTokenPosition | getNextPosition(FormatTokenPosition pos, Position.Bias bias) Get the token-position preceeding the given one. |
public FormatTokenPosition | getNextPosition(TokenItem token, int offset) |
public FormatTokenPosition | getPosition(TokenItem token, int offset) Get the token position that corresponds to the given token and offset. |
public FormatTokenPosition | getPosition(TokenItem token, int offset, Position.Bias bias) |
public FormatTokenPosition | getPreviousPosition(TokenItem token, int offset, Position.Bias bias) Get the previous position of the position given by parameters. |
public FormatTokenPosition | getPreviousPosition(FormatTokenPosition pos) Get the token-position preceeding the given one. |
public FormatTokenPosition | getPreviousPosition(FormatTokenPosition pos, Position.Bias bias) Get the token-position preceeding the given one. |
public FormatTokenPosition | getPreviousPosition(TokenItem token, int offset) |
public TokenItem | getPreviousToken(TokenItem token) Get the previous token or last token if the argument is null. |
public boolean | getSettingBoolean(String settingName, Boolean defaultValue) |
public boolean | getSettingBoolean(String settingName, boolean defaultValue) |
public int | getSettingInteger(String settingName, Integer defaultValue) |
public int | getSettingInteger(String settingName, int defaultValue) |
public Object | getSettingValue(String settingName) |
public Object | getSettingValue(String settingName, Object defaultValue) |
public int | getShiftWidth() |
public int | getSpacesPerTab() |
public int | getTabSize() |
public FormatTokenPosition | getTextStartPosition() |
public TokenContextPath | getValidWhitespaceTokenContextPath() Get the valid whitespace token-context-path by calling
getWhitespaceTokenContextPath(). |
public TokenID | getValidWhitespaceTokenID() Get the valid whitespace token-id by calling
getWhitespaceTokenID(). |
public int | getVisualColumnOffset(FormatTokenPosition pos) Get the column-offset of the tokenItem on its line. |
public TokenContextPath | getWhitespaceTokenContextPath() Get the token-context-path that should be assigned to the token that
consists of the indentation whitespace only. |
public TokenID | getWhitespaceTokenID() Get the token-id that should be assigned to the token that consists of
the indentation whitespace only. |
public void | insertSpaces(TokenItem beforeToken, int spaceCount) |
public void | insertString(TokenItem token, int offset, String text) |
public void | insertString(FormatTokenPosition pos, String text) |
public TokenItem | insertToken(TokenItem beforeToken, TokenID tokenID, TokenContextPath tokenContextPath, String tokenImage) Delegation to the same method in format-writer. |
public boolean | isAfter(TokenItem testedToken, TokenItem afterToken) |
public boolean | isAfter(FormatTokenPosition testedPosition, FormatTokenPosition afterPosition) |
public boolean | isChainStartPosition(FormatTokenPosition pos) |
final public boolean | isIndentOnly() Delegation to the same method in format-writer. |
public boolean | isLineEmpty(FormatTokenPosition pos) Check whether there are no tokens except the ending EOL on the given
line. |
public boolean | isLineWhite(FormatTokenPosition pos) Check whether there are only the whitespace tokens on the given line.
Parameters: token - any token on the line. |
public boolean | isRestartFormat() Delegation to the same method in format-writer. |
public boolean | isWhitespace(TokenItem token, int offset) Decide whether the character at the given offset in the given token is
whitespace. |
public boolean | isWhitespace(FormatTokenPosition pos) |
public void | remove(TokenItem token, int offset, int length) |
public void | remove(FormatTokenPosition pos, int length) |
public void | removeToken(TokenItem token) Remove the token-item from the chain. |
public void | removeTokenChain(TokenItem startToken, TokenItem endToken) Remove all the tokens between start and end token inclusive. |
public void | replaceToken(TokenItem originalToken, TokenID tokenID, TokenContextPath tokenContextPath, String tokenImage) Replace the given token with the new token. |
public void | setIndentShift(int indentShift) Delegation to the same method in format-writer. |
public void | setRestartFormat(boolean restartFormat) Delegation to the same method in format-writer. |
public TokenItem | splitEnd(TokenItem token, int endLength, TokenID newTokenID, TokenContextPath newTokenContextPath) |
public TokenItem | splitStart(TokenItem token, int startLength, TokenID newTokenID, TokenContextPath newTokenContextPath) |
public boolean | tokenEquals(TokenItem compareToken, TokenID withTokenID) Compare token-id of the compare-token with the given token-id. |
public boolean | tokenEquals(TokenItem compareToken, TokenID withTokenID, TokenContextPath withTokenContextPath) Compare token-id of the compare-token with the given token-id and
token-context-path. |
public boolean | tokenEquals(TokenItem compareToken, TokenID withTokenID, TokenContextPath withTokenContextPath, String withTokenImage) Compare token-id of the compare-token with the given token-id and given
token-text.
Parameters: compareToken - token to compare Parameters: withTokenID - token-id with which the token's token-id is compared. |