Electric has the Bean Shell built into it. This enables you to load Java scripts that access the Electric database.
The Bean Shell is not part of the default Electric distribution. You must add it as a "plug in" (see Section 1-5 for more on plug-ins).
To run a script, use the Run Java Bean Shell Script command (in menu Tools / Languages). Here is an example script that searches the current cell for exports starting with "a".
import com.sun.electric.database.hierarchy.Cell;
|
Notice that Electric's "Export" object must be a fully-qualified name, because the name "Export" is used for other reasons in the Bean Shell. This also applies to Electric's "EPoint" class.
For more information about accessing the internals of Electric, read the Javadoc in the source code.