Class JavaScriptResolver
java.lang.Object
org.fife.rsta.ac.js.resolver.JavaScriptResolver
- Direct Known Subclasses:
JavaScriptCompletionResolver
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJavaScriptResolver(SourceCompletionProvider provider) Base JavaScriptResolver -
Method Summary
Modifier and TypeMethodDescriptionabstract JavaScriptTypecompileText(String text) Compiles Text and resolves the type.abstract StringgetFunctionNameLookup(org.mozilla.javascript.ast.FunctionCall call, SourceCompletionProvider provider) Returns same string format asgetLookupText(JSMethodData, String)but from AstNode Functionabstract StringgetLookupText(JSMethodData method, String name) Get lookup string for function completionsprotected abstract TypeDeclarationresolveNativeType(org.mozilla.javascript.ast.AstNode node) Resolve node type to TypeDeclarationabstract TypeDeclarationresolveNode(org.mozilla.javascript.ast.AstNode node) Resolve node type to TypeDeclaration.abstract TypeDeclarationresolveParamNode(String text) Resolve node type to TypeDeclaration.
-
Field Details
-
provider
-
-
Constructor Details
-
JavaScriptResolver
Base JavaScriptResolver- Parameters:
provider- SourceCompletionProvider
-
-
Method Details
-
resolveNode
Resolve node type to TypeDeclaration. Called instead of #compileText(String text) when document is already parsed- Parameters:
node- AstNode to resolve- Returns:
- TypeDeclaration for node or null if not found.
-
resolveParamNode
Resolve node type to TypeDeclaration. Called instead of #compileText(String text) when document is already parsed- Parameters:
text- The type of node to resolve- Returns:
- TypeDeclaration for node or null if not found.
- Throws:
IOException
-
compileText
Compiles Text and resolves the type. e.g. "Hello World".length; //resolve as a Number- Parameters:
text- to compile and resolve- Throws:
IOException
-
resolveNativeType
Resolve node type to TypeDeclaration- Parameters:
node- AstNode to resolve- Returns:
- TypeDeclaration for node or null if not found.
-
getLookupText
Get lookup string for function completions- Parameters:
method- JSMethodData holding method informationname- name of method- Returns:
- The lookup text.
-
getFunctionNameLookup
public abstract String getFunctionNameLookup(org.mozilla.javascript.ast.FunctionCall call, SourceCompletionProvider provider) Returns same string format asgetLookupText(JSMethodData, String)but from AstNode Function- Parameters:
call-provider-- Returns:
- The function name.
-