public interface IInvocationContext
Note: this interface is not intended to be implemented.
Provisional API: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.Modifier and Type | Method and Description |
---|---|
JavaScriptUnit |
getASTRoot()
Returns an AST of the compilation unit, possibly only a partial AST focused on the selection
offset (see
ASTParser.setFocalPosition(int) ). |
IJavaScriptUnit |
getCompilationUnit() |
ASTNode |
getCoveredNode()
Convenience method to evaluate the AST node that is covered by the current selection.
|
ASTNode |
getCoveringNode()
Convenience method to evaluate the AST node covering the current selection.
|
int |
getSelectionLength() |
int |
getSelectionOffset() |
IJavaScriptUnit getCompilationUnit()
int getSelectionOffset()
int getSelectionLength()
JavaScriptUnit getASTRoot()
ASTParser.setFocalPosition(int)
).
The returned AST is shared and therefore protected and cannot be modified.
The client must check the AST API level and do nothing if they are given an AST
they can't handle. (see AST.apiLevel()
).ASTNode getCoveringNode()
ASTNode getCoveredNode()
Copyright (c) IBM Corp. and others 2000, 2016. All Rights Reserved.