public class LeafBlockWrapper extends AbstractBlockWrapper
myEnd, myFlags, myIndentFromParent, myParent, myStart| Constructor and Description |
|---|
LeafBlockWrapper(Block block,
CompositeBlockWrapper parent,
WhiteSpace whiteSpaceBefore,
FormattingDocumentModel model,
CommonCodeStyleSettings.IndentOptions options,
LeafBlockWrapper previousTokenBlock,
boolean isReadOnly)
|
| Modifier and Type | Method and Description |
|---|---|
IndentData |
calculateOffset(CommonCodeStyleSettings.IndentOptions options) |
boolean |
contains(int offset) |
boolean |
containsLineFeeds() |
void |
dispose() |
LeafBlockWrapper |
getNextBlock() |
IndentData |
getNumberOfSymbolsBeforeBlock()
Allows to retrieve object that encapsulates information about number of symbols before the current block starting
from the line start.
|
LeafBlockWrapper |
getPreviousBlock() |
SpacingImpl |
getSpaceProperty() |
int |
getSymbolsAtTheLastLine() |
TextRange |
getTextRange() |
protected boolean |
indentAlreadyUsedBefore(AbstractBlockWrapper child)
Allows to answer if current wrapped block has a child block that is located before given block and has line feed.
|
boolean |
isEndOfCodeBlock() |
boolean |
isLeaf() |
void |
setNextBlock(LeafBlockWrapper nextBlock) |
void |
setSpaceProperty(SpacingImpl currentSpaceProperty) |
arrangeParentTextRange, arrangeStartOffset, calculateChildOffset, findFirstIndentedParent, getAlignment, getAlignmentAtStartOffset, getChildOffset, getEndOffset, getIndent, getLanguage, getLength, getNode, getOwnWrap, getParent, getStartOffset, getWhiteSpace, getWrap, getWraps, isIncomplete, reset, setCanUseFirstChildIndentAsBlockIndent, setIndent, setIndentFromParent, toStringpublic LeafBlockWrapper(Block block, CompositeBlockWrapper parent, WhiteSpace whiteSpaceBefore, FormattingDocumentModel model, CommonCodeStyleSettings.IndentOptions options, LeafBlockWrapper previousTokenBlock, boolean isReadOnly)
LeafBlockWrapper(Block, CompositeBlockWrapper, WhiteSpace, FormattingDocumentModel, CommonCodeStyleSettings.IndentOptions, LeafBlockWrapper, boolean, TextRange)
with text range associated with the given block.block - block to wrapparent - wrapped parent blockwhiteSpaceBefore - white space before the target block to wrapmodel - formatting model to use during current wrapper initializationoptions - code formatting optionspreviousTokenBlock - previous token blockisReadOnly - flag that indicates if target block is read-onlypublic final boolean containsLineFeeds()
public int getSymbolsAtTheLastLine()
public LeafBlockWrapper getPreviousBlock()
getPreviousBlock in class AbstractBlockWrappernull otherwisepublic LeafBlockWrapper getNextBlock()
public void setNextBlock(LeafBlockWrapper nextBlock)
protected boolean indentAlreadyUsedBefore(AbstractBlockWrapper child)
AbstractBlockWrapperindentAlreadyUsedBefore in class AbstractBlockWrapperchild - target child block to processtrue if current block has a child that is located before the given block and contains line feed;
false otherwisepublic IndentData getNumberOfSymbolsBeforeBlock()
AbstractBlockWrappergetNumberOfSymbolsBeforeBlock in class AbstractBlockWrapperpublic void dispose()
dispose in class AbstractBlockWrapperpublic SpacingImpl getSpaceProperty()
public IndentData calculateOffset(CommonCodeStyleSettings.IndentOptions options)
public void setSpaceProperty(SpacingImpl currentSpaceProperty)
public final boolean isLeaf()
public boolean contains(int offset)
public TextRange getTextRange()
public boolean isEndOfCodeBlock()