|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.aptana.ide.editor.js.context.JSLexemeUtils
public class JSLexemeUtils
| Constructor Summary | |
|---|---|
JSLexemeUtils(LexemeList lexemeList)
Constructs a new File environment. |
|
| Method Summary | |
|---|---|
void |
calculateCurrentLexeme(int offset)
Calculates the index and lexeme that the given offset is within and caches it. |
int |
findDocOffset(int currentIndex)
findDocOffset |
JSFunctionInfo |
findIdentifierBeforeEqual(int currentIndex)
findIdentifierBeforeEqual |
int |
findNextTokenType(int startIndex,
int typeIndex)
findNextTokenType |
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. |
JSFunctionInfo |
getFunctionInfo(int currentIndex)
Looks for the name of the function in the following formats: TYPE 1: function foo() {} TYPE 2: foo = function() {} TYPE 3: bar.foo = function() {} TYPE 4: foo = { "bar" : function() {}, bar2 : function() {}, ... |
int |
getIndexAfterTypeIdentifier(int index)
getIndexAfterTypeIdentifier |
int |
getLexemeCeilingIndex(int offset)
Gets the lexeme ceiling index from a given offset (lexeme offset, not document offset). |
int |
getLexemeFloorIndex(int offset)
Gets the lexeme floor index from a given offset (lexeme offset, not document offset). |
Lexeme |
getLexemeFromDocumentOffset(int offset)
Calculates and returns the Lexeme at a document based offset. |
int |
getLexemeIndexFromDocumentOffset(int offset)
Calculates and returns the Lexeme index at the current document offset. |
LexemeList |
getLexemeList()
Get the current list of lexemes and synchronize the command tree. |
Lexeme |
getNextIdentifier(int index)
Returns the next IDENTIFIER Lexeme from the starting 'index' position |
java.lang.String |
getNextTypeIdentifier(int startIndex)
getNextTypeIdentifier |
Lexeme |
getPreviousIdentifier(int index)
getPreviousIdentifier |
java.lang.String |
getTypeAfterEqualNew(int index)
Find 'foo' in a 'var a = new foo();' statement, but also account for comments. |
int |
isNextTokenType(int startIndex,
int typeIndex)
isNextTokenType |
int |
isPrevTokenType(int startIndex,
int typeIndex)
isPrevTokenType |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JSLexemeUtils(LexemeList lexemeList)
lexemeList - | Method Detail |
|---|
public LexemeList getLexemeList()
public Lexeme getCurrentLexeme()
public int getCurrentLexemeIndex()
public int getLexemeIndexFromDocumentOffset(int offset)
offset - The offset in the document to check at.
public int getLexemeFloorIndex(int offset)
offset -
public int getLexemeCeilingIndex(int offset)
offset -
public Lexeme getLexemeFromDocumentOffset(int offset)
offset - The offset in the document to check at.
public void calculateCurrentLexeme(int offset)
offset - public Lexeme getNextIdentifier(int index)
index -
public Lexeme getPreviousIdentifier(int index)
index -
public java.lang.String getNextTypeIdentifier(int startIndex)
startIndex -
public java.lang.String getTypeAfterEqualNew(int index)
index -
public int getIndexAfterTypeIdentifier(int index)
index -
public int findNextTokenType(int startIndex,
int typeIndex)
startIndex - typeIndex -
public int isNextTokenType(int startIndex,
int typeIndex)
startIndex - typeIndex -
public int isPrevTokenType(int startIndex,
int typeIndex)
startIndex - typeIndex -
public JSFunctionInfo getFunctionInfo(int currentIndex)
currentIndex - The current index of the lexemes to look at.
public int findDocOffset(int currentIndex)
currentIndex -
public JSFunctionInfo findIdentifierBeforeEqual(int currentIndex)
currentIndex -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||