|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.aptana.ide.editors.unified.ChildOffsetMapper
com.aptana.ide.editor.js.JSOffsetMapper
public class JSOffsetMapper
| Field Summary | |
|---|---|
static java.lang.String |
MODE_INVOKING
MODE_INVOKING for assist type |
static java.lang.String |
MODE_NEW
MODE_NEW for assist type |
static java.lang.String |
MODE_NORMAL
MODE_NORMAL for assist type |
static java.lang.String |
MODE_STRING
MODE_INVOKING for assist type |
static java.lang.String |
NOT_AN_IDENTIFIER
NOT_AN_IDENTIFIER marker for code assist |
static java.lang.String |
NOT_INVOKING
NOT_INVOKING marker for code assist |
| Constructor Summary | |
|---|---|
JSOffsetMapper(IParentOffsetMapper parent)
|
|
| Method Summary | |
|---|---|
ICodeLocation |
findTarget(Lexeme lexeme)
findTarget |
static ICodeLocation |
findTargetFromName(IObject object,
Property prop)
Finds a target based on the passed scope. |
java.lang.String |
getArgAssistNameHash()
getArgAssistNameHash |
int |
getArgIndexAndCalculateMode()
Gets the index of the arg from the current offset (arg0, arg1, ...), based on the number of commas viewed. |
int |
getFileIndex()
getFileIndex |
JSScope |
getGlobal()
Gets the global object for this file's environment. |
static java.lang.String |
getIdentName(int position,
LexemeList lexemeList)
getIdentName |
java.lang.String |
getMode(int offset)
Returns the invocation mode (invoking, new, or normal). |
java.lang.String |
getNameHash(int lexemeIndex)
Gets the full name of of an object that is at the passed offset. |
IParseState |
getParseState()
getParseState |
static Property |
getPropertyInScope(IObject object,
java.lang.String propName)
getPropertyInScope |
IScope |
getScope(Lexeme lex,
IScope defaultScope)
Returns the environment scope for the specified lexeme. |
IObject |
lookupReturnTypeFromNameHash(java.lang.String fullname,
IScope scope)
Looks up an object in the global table based on its full name. |
IObject |
lookupReturnTypeFromNameHash(java.lang.String fullname,
IScope scope,
boolean searchForward)
Looks up an object in the global table based on its full name. |
static Property |
lookupTypeFromNameHash(java.lang.String fullname,
IScope scope,
int offset,
JSOffsetMapper jsfe)
Looks up an object in the global table based on its full name and returns the final object (not its return type). |
| Methods inherited from class com.aptana.ide.editors.unified.ChildOffsetMapper |
|---|
calculateCurrentLexeme, dispose, getCurrentLexeme, getCurrentLexemeIndex, getFileService, getLexemeAtIndex, getLexemeIndexFromDocumentOffset, getLexemeList, getNextLexeme, getParent, getPreviousLexeme |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.aptana.ide.editors.unified.IChildOffsetMapper |
|---|
getFileService, getParent |
| Methods inherited from interface com.aptana.ide.parsing.IOffsetMapper |
|---|
calculateCurrentLexeme, dispose, getCurrentLexeme, getCurrentLexemeIndex, getLexemeAtIndex, getLexemeIndexFromDocumentOffset, getLexemeList |
| Field Detail |
|---|
public static final java.lang.String MODE_NORMAL
public static final java.lang.String MODE_NEW
public static final java.lang.String MODE_INVOKING
public static final java.lang.String MODE_STRING
public static final java.lang.String NOT_AN_IDENTIFIER
public static final java.lang.String NOT_INVOKING
| Constructor Detail |
|---|
public JSOffsetMapper(IParentOffsetMapper parent)
parent - | Method Detail |
|---|
public static Property lookupTypeFromNameHash(java.lang.String fullname,
IScope scope,
int offset,
JSOffsetMapper jsfe)
fullname - Full name of the object to lookupscope - The scope to start looking from - this allows lookup from inside a function scope.offset - jsfe -
public static java.lang.String getIdentName(int position,
LexemeList lexemeList)
position - lexemeList -
public static Property getPropertyInScope(IObject object,
java.lang.String propName)
object - propName -
public java.lang.String getMode(int offset)
offset - The index to check the mode at.
public java.lang.String getNameHash(int lexemeIndex)
lexemeIndex - -
index of lexeme
public java.lang.String getArgAssistNameHash()
public IObject lookupReturnTypeFromNameHash(java.lang.String fullname,
IScope scope)
fullname - Full name of the object to lookupscope - The scope to start looking from - this allows lookup from inside a function scope.
public IObject lookupReturnTypeFromNameHash(java.lang.String fullname,
IScope scope,
boolean searchForward)
fullname - Full name of the object to lookupscope - The scope to start looking from - this allows lookup from inside a function scope.searchForward - Looks forward in doc if part of name not found at current fileIndex/offset
public int getArgIndexAndCalculateMode()
public int getFileIndex()
public JSScope getGlobal()
public IScope getScope(Lexeme lex,
IScope defaultScope)
lex - defaultScope -
public IParseState getParseState()
public ICodeLocation findTarget(Lexeme lexeme)
IOffsetMapper
findTarget in interface IOffsetMapperfindTarget in class ChildOffsetMapperIOffsetMapper.findTarget(com.aptana.ide.lexer.Lexeme)
public static ICodeLocation findTargetFromName(IObject object,
Property prop)
object - prop -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||