org.netbeans.lib.lexer .EmbeddedTokenList EmbeddedTokenList final public class EmbeddedTokenList extends FlyOffsetGapList implements MutableTokenList <T> (Code) Embedded token list maintains a list of tokens
on a particular embedded language level .
The physical storage contains a gap to speed up list modifications
during typing in a document when tokens are typically added/removed
at the same index in the list.
There is an intent to not degrade performance significantly
with each extra language embedding level so the token list maintains direct
link to the root level.
author: Miloslav Metelkaversion: 1.00
Method Summary public charchildTokenCharAt (int rawOffset, int index) public intchildTokenOffset (int rawOffset) public intchildTokenOffsetNoUpdate (int rawOffset) public intchildTokenOffsetShift (int rawOffset) Get difference between start offset of the particular child token
against start offset of the root token.public LexerInputOperation <T>createLexerInputOperation (int tokenIndex, int relexOffset, Object relexState) protected intelementLength (Object elem) protected intelementRawOffset (Object elem) public LanguageEmbedding embedding () public EmbeddingContainer >embeddingContainer () public intendOffset () public voidinit (Object relexState) public InputAttributes inputAttributes () public booleanisContinuous () protected booleanisElementFlyweight (Object elem) public booleanisFullyLexed () public booleanisInited () Check whether this embedded token list is initialized.public booleanisRemoved () public LanguagePath languagePath () public intlookahead (int index) public intmodCount () EmbeddedTokenList > nextEmbeddedTokenList () public AbstractToken <T>replaceFlyToken (int index, AbstractToken <T> flyToken, int offset) public voidreplaceTokens (TokenListChange <T> change, int removeTokenCount, int diffLength) public TokenList >root () public AbstractToken >rootToken () protected voidsetElementRawOffset (Object elem, int rawOffset) public voidsetEmbeddingContainer (EmbeddingContainer > embeddingContainer) void setNextEmbeddedTokenList (EmbeddedTokenList > nextEmbeddedTokenList) public Set <T>skipTokenIds () public intstartOffset () public Object state (int index) public String toString () public String toStringHeader () public inttokenCount () public inttokenCountCurrent () public TokenHierarchyOperation , ?>tokenHierarchyOperation () public inttokenOffset (int index) Returns absolute offset of the token at the given index
(startOffset gets added to the child token's real offset).public Object tokenOrEmbeddingContainer (int index) public Object tokenOrEmbeddingContainerUnsync (int index) public voidwrapToken (int index, EmbeddingContainer embeddingContainer)
NO_DEFAULT_EMBEDDING final public static EmbeddedTokenList <TokenId > NO_DEFAULT_EMBEDDING (Code) Marker value that represents that an attempt to create default embedding was
made but was unsuccessful.
childTokenCharAt public char childTokenCharAt(int rawOffset, int index)(Code)
childTokenOffset public int childTokenOffset(int rawOffset)(Code)
childTokenOffsetNoUpdate public int childTokenOffsetNoUpdate(int rawOffset)(Code)
childTokenOffsetShift public int childTokenOffsetShift(int rawOffset)(Code) Get difference between start offset of the particular child token
against start offset of the root token.
elementRawOffset protected int elementRawOffset(Object elem)(Code)
endOffset public int endOffset()(Code)
isContinuous public boolean isContinuous()(Code)
isElementFlyweight protected boolean isElementFlyweight(Object elem)(Code)
isFullyLexed public boolean isFullyLexed()(Code)
isInited public boolean isInited()(Code) Check whether this embedded token list is initialized.
If not then the updating process should not touch it unless
the token list list exists for this particular language path.
isRemoved public boolean isRemoved()(Code)
lookahead public int lookahead(int index)(Code)
modCount public int modCount()(Code)
replaceTokens public void replaceTokens(TokenListChange <T> change, int removeTokenCount, int diffLength)(Code)
setElementRawOffset protected void setElementRawOffset(Object elem, int rawOffset)(Code)
skipTokenIds public Set <T> skipTokenIds()(Code)
startOffset public int startOffset()(Code)
tokenCount public int tokenCount()(Code)
tokenCountCurrent public int tokenCountCurrent()(Code)
tokenOffset public int tokenOffset(int index)(Code) Returns absolute offset of the token at the given index
(startOffset gets added to the child token's real offset).
For token hierarchy snapshots the returned value is corrected
in the TokenSequence explicitly by adding TokenSequence.tokenOffsetDiff.
tokenOrEmbeddingContainer public Object tokenOrEmbeddingContainer(int index)(Code)
tokenOrEmbeddingContainerUnsync public Object tokenOrEmbeddingContainerUnsync(int index)(Code)