com.aptana.ide.parsing
Interface IOffsetMapper

All Known Subinterfaces:
IChildOffsetMapper, IParentOffsetMapper
All Known Implementing Classes:
ChildOffsetMapper, CSSOffsetMapper, HTMLOffsetMapper, JSOffsetMapper, ParentOffsetMapper, ScriptDocOffsetMapper

public interface IOffsetMapper

Author:
IOffsetMapper

Method Summary
 void calculateCurrentLexeme(int offset)
          Calculates the index and lexeme that the given offset is within and caches it.
 void dispose()
          Disposes the object.
 ICodeLocation findTarget(Lexeme lexeme)
          findTarget
 Lexeme getCurrentLexeme()
          Gets the cached current Lexeme based on the current offset of the document.
 int getCurrentLexemeIndex()
          Gets the cached current Lexeme index based on the offset in the current document.
 Lexeme getLexemeAtIndex(int index)
          Gets the lexeme at the specified index.
 int getLexemeIndexFromDocumentOffset(int offset)
          With a name this long you don't really need a comment.
 LexemeList getLexemeList()
          getLexemeList
 

Method Detail

getLexemeList

LexemeList getLexemeList()
getLexemeList

Returns:
LexemeList

calculateCurrentLexeme

void calculateCurrentLexeme(int offset)
Calculates the index and lexeme that the given offset is within and caches it. This accounts for whitespace areas by setting the result to the previous lexeme if available.

Parameters:
offset -

getCurrentLexeme

Lexeme getCurrentLexeme()
Gets the cached current Lexeme based on the current offset of the document.

Returns:
Returns the current lexeme.

getLexemeAtIndex

Lexeme getLexemeAtIndex(int index)
Gets the lexeme at the specified index.

Parameters:
index -
Returns:
Returns the current lexeme at that index, or null if not found.

getCurrentLexemeIndex

int getCurrentLexemeIndex()
Gets the cached current Lexeme index based on the offset in the current document.

Returns:
Returns the current lexeme index.

getLexemeIndexFromDocumentOffset

int getLexemeIndexFromDocumentOffset(int offset)
With a name this long you don't really need a comment.

Parameters:
offset -
Returns:
returns the LexemeIndexFromDocumentOffset

findTarget

ICodeLocation findTarget(Lexeme lexeme)
findTarget

Parameters:
lexeme -
Returns:
ICodeLocation

dispose

void dispose()
Disposes the object.