Using the Code Sourcerer
Every code area in the Composer has a Code Sourcerer button. When the user presses this button, a dialog will appear which will guide the user through a context-sensitive set of pages. By making a few selections, and filling in a few entry fields the user can construct Java statements to perform a wide variety of activities.
The Code Sourcerer presents the user with a series of panels. Once finished with a panel, the user can proceed to the next panel by pressing the Next button. The user can return to a previous panel using the Back button. At any time the user can quit the Code Sourcerer by pressing the Cancel button. Once the Code Sourcerer has obtained enough information to completely write the requested code, the Done button will become enabled. Pressing Done will write the code. Each of these buttons will become enabled/disabled in a context-sensitive manner. In some cases, both Next and Done will be disabled. This indicates that there are still critical fields to be filled in before the Code Sourcerer can proceed.
Each time the Code Sourcerer is invoked, the code which is produced is added to the code area. This code can be used as is, combined with other user code, or edited to meet particular needs. The code will be appended to the end of the code area unless the control key is held down when the Code Sourcerer is pressed.
The first panel of the Code Sourcerer may contain many different categories, depending upon the type of composer which is open. The user can choose from
- Servlet operations... These options can only be performed by a Servlet.
- Template operations... Create a Template object or modify an existing template.
- JDBC operations... Connect to a database, search it, or analyze the results.
- Declare a new variable... Create a new variable of any type and optionally initialize it.
- File operations... Read, write, or modify files.
- Printing operations... Print a part, some text, or create a complex print job.
- Java system operations... Interact with the Java Virtual Machine or the Operating System.
- Network operations... Set up and use a network connection, using either the TCP or UDP protocol.
- Miscellaneous... Font, Image, Beep, Email, more...
- Java Language Statements... Conditional statements (if, if else) and loop statements.
| Data Representations, Inc. http://www.datarepresentations.com support@datarepresentations.com sales@datarepresentations.com |