This section describes the js API used to create CSA plugins.
The main codeBase object. Resembles the root of the AST hierarchy and manages user cursor positions.
Create a NodeCollection with nodes matching the given selection or search pattern.
StringThe selector or search pattern to use.
StringThe type of nodes to select.
Creates an empty file at the given path, and returns the node reference to the given file.
StringPath to the file, which can be either relative to the current project directory, or absolute. The directory in which is created must exist, and have the appropriate permissions.
NodeCollectionthe node collection containing the file node
Parses the given file path and returns a NodeCollection with the associated node.
StringPath to the file, which can be either relative to the current project directory, or absolute.
NodeCollectionContains the file node if the file has been found or parsed correctly, otherwise the Collection will be empty.
Finds the file matching the given selector, and reparses the file if found, updating the codeBase.
StringSelector matching the file to be reparsed.
NodeCollectionContains the reparsed file, or is empty if the file is not found or could not be parsed.
Creates the given set of directories recursively.
StringThe path to create. This can be relative to the current project directory or absolute.
BooleanTrue if created, false otherwise.