These macros handle text formatting and generation tasks that are particularly useful in writing Java code.
Get_Class_Name.bsh
Abstract
Inserts a Java class name based upon the buffer's file name.
Get_Package_Name.bsh
Abstract
Inserts a plausible Java package name for the current buffer.
The macro compares the buffer's path name with the elements of the classpath being used by the jEdit session. An error message will be displayed if no suitable package name is found. This macro will not work if jEdit is being run as a JAR file without specifying a classpath; in that case the classpath seen by the macro consists solely of the JAR file.
Make_Get_and_Set_Methods.bsh
Abstract
Creates getXXX() or setXXX() methods that can be pasted into the buffer text.
This macro presents a dialog that will “grab” the names of instance variables from the caret line of the current buffer and paste a corresponding getXXX() or setXXX() method to one of two text areas in the dialog. The text can be edited in the dialog and then pasted into the current buffer using the Insert... buttons. If the caret is set to a line containing something other than an instance variable, the text grabbing routine is likely to generate nonsense.
As explained in the notes accompanying the source code, the macro uses a global variable which can be set to configure the macro to work with either Java or C++ code. When set for use with C++ code, the macro will also write (in commented text) definitions of getXXX() or setXXX() suitable for inclusion in a header file.
Preview_Javadoc_of_Buffer.bsh
Abstract
Creates and displays javadoc for current buffer.
The macro includes configuration variables for using different doclets for generating javadocs and for generating javadocs of the package of which the current buffer is a part. Details for use are included in the note accompanying the macro's source code.