Interactive
High-level API to get information out of typed trees, designed to be used by IDEs.
High-level API to get information out of typed trees, designed to be used by IDEs.
- See also
InteractiveDriverto get typed trees from code.
Type members
Classlikes
Value members
Concrete methods
The source symbols that are the closest to path.
The source symbols that are the closest to path.
If this path ends in an import, then this returns all the symbols that are imported by this import statement.
- Value Params
- path
The path to the tree whose symbols to extract.
- Returns
The source symbols that are the closest to
path.- See also
sourceSymbol
The closest enclosing tree with a symbol containing position pos, or the EmptyTree.
The closest enclosing tree with a symbol containing position pos, or the EmptyTree.
The closes enclosing tree with a symbol, or the EmptyTree.
The closes enclosing tree with a symbol, or the EmptyTree.
The type of the closest enclosing tree with a type containing position pos.
The type of the closest enclosing tree with a type containing position pos.
Find the definitions of the symbol at the end of path. In the case of an import node,
all imported symbols will be considered.
Find the definitions of the symbol at the end of path. In the case of an import node,
all imported symbols will be considered.
- Value Params
- driver
The driver responsible for
path.- path
The path to the symbol for which we want the definitions.
- Returns
The definitions for the symbol at the end of
path.
Find the definitions of symbols.
Find the definitions of symbols.
- Value Params
- driver
The driver responsible for the given symbols.
- includeExternal
If true, also look for definitions on the classpath.
- includeOverridden
If true, also include the symbols overridden by any of
symbols.- symbols
The list of symbols for which to find a definition.
- Returns
The definitions for the symbols in
symbols, and ifincludeOverriddenis set, the definitions for the symbols that they override.
Find trees that match symbol in trees.
Find trees that match symbol in trees.
- Value Params
- includes
Whether to include references, definitions, etc.
- predicate
An additional predicate that the trees must match.
- symbol
The symbol for which we want to find references.
- trees
The trees to inspect.
Return a predicate function that determines whether a given NameTree is an implementation of
sym.
Return a predicate function that determines whether a given NameTree is an implementation of
sym.
- Value Params
- sym
The symbol whose implementations to find.
- Returns
A function that determines whether a
NameTreeis an implementation ofsym.
Is this tree using a renaming introduced by an import statement or an alias for this?
Is this tree using a renaming introduced by an import statement or an alias for this?
- Value Params
- tree
The tree to inspect
- Returns
True, if this tree's name is different than its symbol's name, indicating that it uses a renaming introduced by an import statement or an alias for
this.
Given sym, originating from sourceDriver, find its representation in
targetDriver.
Given sym, originating from sourceDriver, find its representation in
targetDriver.
- Value Params
- sourceDriver
The driver from which
symboloriginates.- symbol
The symbol to expression in the new driver.
- targetDriver
The driver in which we want to get a representation of
symbol.
- Returns
A representation of
symbolintargetDriver.
Check if tree matches sym.
This is the case if the symbol defined by tree equals sym,
or the source symbol of tree equals sym,
or include is overridden, and tree is overridden by sym,
or include is overriding, and tree overrides sym.
Check if tree matches sym.
This is the case if the symbol defined by tree equals sym,
or the source symbol of tree equals sym,
or include is overridden, and tree is overridden by sym,
or include is overriding, and tree overrides sym.
Find named trees with a non-empty position whose symbol match sym in trees.
Find named trees with a non-empty position whose symbol match sym in trees.
Note that nothing will be found for symbols not defined in source code,
use sourceSymbol to get a symbol related to sym that is defined in
source code.
Find named trees with a non-empty position satisfying treePredicate in trees.
Find named trees with a non-empty position satisfying treePredicate in trees.
- Value Params
- include
Whether to include references, definitions, etc.
- treePredicate
An additional predicate that the trees must match.
- trees
The trees to inspect.
- Returns
The trees with a non-empty position satisfying
treePredicate.
The reverse path to the node that closest encloses position pos,
or Nil if no such path exists. If a non-empty path is returned it starts with
the tree closest enclosing pos and ends with an element of trees.
The reverse path to the node that closest encloses position pos,
or Nil if no such path exists. If a non-empty path is returned it starts with
the tree closest enclosing pos and ends with an element of trees.