Chapter 17. BeanShell Commands

Table of Contents

17.1. Output Commands
17.2. File Management Commands
17.3. Component Commands
17.4. Resource Management Commands
17.5. Script Execution Commands
17.6. BeanShell Object Management Commands
17.7. Other Commands

BeanShell includes a set of commands; subroutines that can be called from any script or macro. The following is a summary of those commands which may be useful within jEdit.

Note

Java classes in plugins cannot make use of BeanShell commands directly. However, these commands can be called from BeanShell code that is part of a plugin, for example the snippets in actions.xml, or any BeanShell scripts shipped with the plugin and loaded on startup.

17.1. Output Commands

  • void cat(filename); 
    String filename;
     

    Writes the contents of filename to the activity log.

  • void javap(target); 
    String | Object | Class target;
     

    Writes the public fields and methods of the specified class to the output stream of the current process.

  • void print(arg); 
    arg;
     

    Writes the string value of the argument to the activity log, or if run from the Console plugin, to the current output window. If arg is an array, print runs itself recursively on the array's elements.