public class JavaScriptCompletionResolver extends JavaScriptResolver
| Modifier and Type | Field and Description |
|---|---|
protected JavaScriptType |
lastJavaScriptType |
protected java.lang.String |
lastLookupName |
provider| Constructor and Description |
|---|
JavaScriptCompletionResolver(SourceCompletionProvider provider)
Standard ECMA JavaScript resolver
|
| Modifier and Type | Method and Description |
|---|---|
JavaScriptType |
compileText(java.lang.String text)
Compiles Text and resolves the type.
|
protected TypeDeclaration |
findJavaStaticType(org.mozilla.javascript.ast.AstNode node)
Try to resolve the Token.NAME AstNode and return a TypeDeclaration
|
java.lang.String |
getFunctionNameLookup(org.mozilla.javascript.ast.FunctionCall call,
SourceCompletionProvider provider)
Returns same string format as
JavaScriptResolver.getLookupText(JSMethodData, String) but from AstNode Function |
java.lang.String |
getLookupText(JSMethodData method,
java.lang.String name)
Get lookup string for function completions
|
protected JavaScriptType |
lookupFromName(org.mozilla.javascript.ast.AstNode node,
JavaScriptType lastJavaScriptType)
Lookup the name of the node within the last JavaScript type.
|
protected JavaScriptType |
lookupFunctionCompletion(org.mozilla.javascript.ast.AstNode node,
JavaScriptType lastJavaScriptType)
Lookup the function name of the node within the last JavaScript type.
|
protected TypeDeclaration |
resolveNativeType(org.mozilla.javascript.ast.AstNode node)
Resolve node type to TypeDeclaration
N.B called from
CompilerNodeVisitor.visit() |
TypeDeclaration |
resolveNode(org.mozilla.javascript.ast.AstNode node)
Resolve node type to TypeDeclaration.
|
TypeDeclaration |
resolveParamNode(java.lang.String text)
Resolve node type to TypeDeclaration.
|
protected TypeDeclaration |
resolveTypeFromLastJavaScriptType(org.mozilla.javascript.ast.AstNode node)
Method called if the lastJavaScriptType is not null.
|
protected TypeDeclaration |
testJavaStaticType(org.mozilla.javascript.ast.AstNode node)
Test whether the node can be resolved as a static Java class.
|
protected JavaScriptType lastJavaScriptType
protected java.lang.String lastLookupName
public JavaScriptCompletionResolver(SourceCompletionProvider provider)
provider - public JavaScriptType compileText(java.lang.String text) throws java.io.IOException
compileText in class JavaScriptResolvertext - to compile and resolvejava.io.IOExceptionpublic TypeDeclaration resolveParamNode(java.lang.String text) throws java.io.IOException
resolveParamNode in class JavaScriptResolvernode - AstNode to resolvejava.io.IOExceptionpublic TypeDeclaration resolveNode(org.mozilla.javascript.ast.AstNode node)
resolveNode in class JavaScriptResolvernode - AstNode to resolveprotected TypeDeclaration resolveNativeType(org.mozilla.javascript.ast.AstNode node)
CompilerNodeVisitor.visit()resolveNativeType in class JavaScriptResolvernode - AstNode to resolveprotected TypeDeclaration testJavaStaticType(org.mozilla.javascript.ast.AstNode node)
node - node to testprotected TypeDeclaration findJavaStaticType(org.mozilla.javascript.ast.AstNode node)
node - node to resolveprotected JavaScriptType lookupFromName(org.mozilla.javascript.ast.AstNode node, JavaScriptType lastJavaScriptType)
node - lastJavaScriptType - protected JavaScriptType lookupFunctionCompletion(org.mozilla.javascript.ast.AstNode node, JavaScriptType lastJavaScriptType)
node - lastJavaScriptType - public java.lang.String getLookupText(JSMethodData method, java.lang.String name)
JavaScriptResolvergetLookupText in class JavaScriptResolvermethod - JSMethodData holding method informationname - name of methodpublic java.lang.String getFunctionNameLookup(org.mozilla.javascript.ast.FunctionCall call,
SourceCompletionProvider provider)
JavaScriptResolverJavaScriptResolver.getLookupText(JSMethodData, String) but from AstNode FunctiongetFunctionNameLookup in class JavaScriptResolverprotected TypeDeclaration resolveTypeFromLastJavaScriptType(org.mozilla.javascript.ast.AstNode node)
node - Node to resolve