# JadeIDE Help (V2.7 February 2002)

JadeIDE (Integrated Development Environment for Java TM) is a product of
"Wolfgang Kurz, Im Asemwald 2/18, D-70599 Stuttgart, Germany".
( Note: Java is a registered trademark of the SUN Corporation. )

To contact the author please send an E-Mail to Wolfgang_Kurz@t-online.de
(please mind the underscore between the names!).

To get information about other products provided by the author please visit the "Homesite of Jade" by klicking the Jade Icon (if you are connected to the internet).

or via the hyperlink http://home.t-online.de/home/Wolfgang_Kurz/homepage.htm.
This is also the site where you always will find the most recent release of the JadeIDE product.

## Content

- Introduction
- The "Setup" Dialogs for the JadeIDE Parameter Definition
  - The Dialog to Setup the Base Parameters
  - The Dialog to Setup the Project Parameters
  - The Dialog to Define the Options for the Java Compiler
  - The Dialog to Define the Options for the Java Launcher
  - The Dialog to Define the Start Class and their required Parameters
  - Presentation of Actually Activated Parameter Values
- Working with JadeIDE

- The JadeIDE Functions
- The JadeIDE Project Actions
- The Dialog to Generate a HTML File for the Applet Invocation
- The Dialog to Generate a Window Frame
- The Dialogs for the Generation of Individual Dialog Frames

- The JADE Editor
  - The Functions of the File Menu
  - The Functions of the Edit Menu
  - The Functions of the Options Menu
  - The Functions of the Tool Bar
- Installation

- Prerequisites
- Installation
- Deinstallation
- Program Invocation

## Introduction

The Jade Integrated Development Environment is a lightweight development environment for Java. It allows a programmer working with a JDK (Java Development Kit e.g. from SUN Microsystems) to maintain a set of parameters which allows (without the need to use the operating system dependent command interface of the development tools) to edit source code and to compile Java classes. Supported is also the invocation of Java applications and Java applets via the Java class containing the "main()" respectively the "init()" method. This comprises the provision of the parameters the "main()" or "init()" method expects.

JadeIDE provides a layer above the SUN JDK which eases the usage of this toolkit. JadeIDE provides it's own editor but it also supports the usage of external editors. JadeIDE therefore allows the users to choose the editor(s) they are most comfortable with.
(Note: The external editor JadeIDE has been most intensively tested with is the "Programmers's File Editor" from Alan Phillips. See also under "Installation").
Although some editors support the invocation of programs (e.g. the invocation of a compiler) to work with JadeIDE is normally more flexible and more efficient because the JADE Editor saves all files currently open under it before a compilation is started via this editor, because it is very easy to switch between editors, because JadeIDE only presents project relevant files to a programmer, because JadeIDE supports code generation, and because JadeIDE allows to work in several "threads".

The following functions are provided by JadeIDE:

- Definition of the required basic parameters (Funktionen => Maintain Basic Parameters)
- Definition of the required projects and project parameters (Funktionen => Define / Update Projects)
- Selection of a project to work with (Functions => Work on Projects)
- Jade Editor with (besides others) the following capabilities:
  - to switch directly to a method defined in the class currently edited
  - to insert predefined Java code templates into the source code
  - to check the Java code with the Code-Checker JiveLint from Sureshot.
  (Project Actions => Edit with JADE-Editor)
- Invocation of an external editor to manipulate files (Project Actions => Edit with external Editor)
- Invocation of a HTML - Editor (Functions => Start HTML-Editor)
- Invocation of the Java API documentation via a browser (Functions => Show Java API Doc)
- Invocation of project specific API documentation via a browser (Functions => Show Package API Doc)
- Creation and initialization of a new Java source file (Project Actions => Create new Class)
- Creation and modification of HTML files to invoke a class as Java applet (Project Actions => Create/change HTML file)
- Deletion of an existing source file (Project Actions => Delete selected File)
- Invocation of the java compiler to compile a selected source file (Project Actions => Compile selected File)
- Generation of the source code for an individual window frame with a menu bar (Project Actions => Generate Window Frame)
- Generation of the source code for an individual dialog frame (Project Actions => Generate Dialog Window)
- Compile all classes of the active project (Project Actions => Compile active Project)
- Generation of the JavaDoc HTML-file for a specific project package (Project Actions => Generate JavaDoc)
- Execution of a Java applet, that is: execution of a class with an init() method as applet (Project Actions => Run Applet)
- Execution of a Java program, that is: execution of a class with a main() method as application (Project Actions => Run Application)
- Cancellation of a running compilation or application/applet execution (Project Actions => Cancel active action)
- Presentation of the actual content of the System Clipboard (Functions => Show clipboad content)

All actions provided by JadeIDE are controlled from the menus and menu items of the JadeIDE main window.

Information relevant and important for the actions to be performed are displayed in this JadeIDE main window. Only really important information is shown to reserve as much space as possible for the editors.

The JadeIDE main window is initially presented at the upper edge of the screen (but can be moved to any position). It occupies (according to the actual screen resolution) about 1/10 to 1/12 of the available screen depth. That gives enough room for other windows (e.g. the editor window) to guarantee convenient project work.

The important tools of the "SUN Development Toolkit" are invoked via a pretty awkward to use "ASCII command interface". They do not come with a user friendly graphical interface (GUI). Without the exploitation of a development environment a programmer has to keep in mind a lot of information in order to modify the required commands which have to be keyed in via the DOS window. This is pretty inconvenient, time consuming and error prone.

To make the programming more efficient, JadeIDE provides a graphical enduser interface, which allows to store the commands in the form required by the actual installation and to recall and modify them, whenever they are needed.

As a lot of developers pretty often use different text-editors, web-browsers and HTML-editors, JadeIDE allows to store more than one instance of an invocation command as base parameter (e.g. a command to invoke the Web-Browser).

A programmer can therefore activate his preferred set of base parameters for each development session.

As for a certain development project normally always the same set of commands (project parameters) is used, JadeIDE allows to group the desired commands and to store this group under a project name. Such a group than can be activated in a single action when a project is opened.

A command in almost any case can be split up in a section, which stays always the same and a section which is individual for a specific task. Therefore JadeIDE does not store a command in it's final form, as it would have to be keyed in, but in the form of a command or parameter template representing only the fixed part of the command. Such a template must be complemented by the variable part (e.g. the file name, a path, etc.). The error free compilation of the final command is done by JadeIDE, before submitting the command in order to trigger a desired action.

to content

## The "Setup" Dialogs for the JadeIDE Parameter Definition

The parameters required when developing with JadeIDE fall into 2 categories. The first group are the base parameters, that are those parameters needed for each development. The second category are the project parameters. Project parameters are specific for a certain project.

The base parameters are:

1. BC_BRWS - template for the invocation of a web-browser used to present the JadeIDE help file, the Java API documentation and potentially project documentation generated with Javadoc.
   Example: C:\Programms\netscape61\netscape6.exe
2. BC_EDIT - template to invoke the external editor to manipulate the source code of an existing class. The inbuilt editor provided by JadeIDE needs not to be defined, but can be specified as "JadeEdit" if the automatically generated entry has been deleted.
   example: C:\Programms\PFE\PFE32.EXE or JadeEdit
3. BC_HTML - template to invoke a specific HTML-editor to manipulate the source code of HTML files e.g. to invoke an applet or to generate project documentation.
   example: C:\Programms\HTMLFormat\HFwin.exe
   Note: HTML files of course can also be edited with the Jade Editor. To do that the invocation must be done via the "Edit" icon in the main window and the Jade Editor must be specified in the BC_Edit parameter.
4. BC_JCK - template to invoke the Code-Checker JiveLint from Sureshot to statically analyse your Java code in order to report potential bugs and weak points in the code.
   example: C:\Programme\JiveLint\jivelint.exe
5. BC_JDK - template (top-level directory of the JDK) for the generation of the invacation caommands for the various SUN JDK tools (Compiler, Launcher, AppletViewer, JavaDoc, ...).
   example: C:\Programme\JDK1.3.2_02\

Project parameters are:

1. BC_COMP - template to invoke the Java Compiler
   example: D:\JDK1.3.1\BIN\JAVAC.EXE -classpath
   This parameter is derived from the Java JDK specified for the project.
2. BC_RUN - template to invoke the Java application launcher
   example: D:\JDK1.3.1\BIN\JAVA.EXE -classpath
   This parameter is derived from the Java JDK specified for the project.
3. BC_AVIEW - template to invoke the Java applet viewer
   example: D:\JDK1.3.1\BIN\APPLETVIEWER.EXE
   This parameter is derived from the Java JDK specified for the project.
4. ClassPath - the "classpath" to be used by the "Java compiler" and the "Java application launcher"
   The system part of the "classpath" normally is evaluated automatically, so that only the component has to be provided, in which the project package can be found. In addition required Java libraries (in the form of a .ZIP or .JAR file) can be provided via the classpath.
   example: D:\WORK\JAVA or D:\WORK\JAVA;D:\WORK\LIB\privlib.zip;D:\WORK\LIB\prjlib.jar;
5. ProjPack - the package name of a project
   example: com.kur.ide
6. ProjPath - The path to the files of a project (without the package component!)
   example: E:\WORK\JAVA
7. MainClass - the class of an application system containing the "main()" method
   The "MainClass" entry may be appended by the parameters expected by the "main()" method when invoked. Caution: mind the case. Java class names are case sensitive!
   example: Control LANG=E

Note: "BC" in the parameter name stands for "base component". BC parameters are therefore command templates representing the fixed part of a command which has to be complemented (e.g. by a class name) in order to prepare the command for execution.

As command templates are specific for each installation (e.g. the SUN JDK is not always stored on the same drive and there are different editors available), JadeIDE cannot provide these templates. They have to be specified by the user according to their specific installation. To support this process, JadeIDE provides a couple of "setup" dialogs.

top of chapter to content

### The Dialog to Setup the Base Parameters

Before you can work with JadeIDE you must - as the very first action after the product installation - define at least one value for each base parameter and make it the default value.

The dialog to define the base parameter templates

The dialog for the base parameter specification allows to define any number of values (parameter templates) for each of the 5 base parameter types "Browsers", "External Editors", "HTML Editors", "Code Checker", and "Java Dev. Kit".

Selection lists in the dialog window provide the already defined values of each parameter type. Via buttons you can add additional values, discard existing values, set a specific value as default value, and modify an existing value.

The dialog for the definition of base parameter templates is invoked via the JadeIDE main window menu "File" menuitem "Maintain Basic Parameters".

Via the dialog you can perform the following actions:

1. Create a new value: To create a new base parameter value (independent of the type) you first should check, if the desired value already exists in the selection list. If not, you must call the system specific file dialog via the "Find and add" button associated to the relevant parameter type. The file dialog allows to search for the desired ".exe" file. If a selection is made in the file dialog and the dialog is closed correctly, the selected value will be added to the list of values for the relevant base parameter. If you want to make a new value to your default, you have to select it as default value explicitely (see below).
2. Remove an existing value: To remove an existing base parameter value you must select the desired value in the choice list (unfold the list via their expand button at the right and klick into the desired value). The selected value will be highlighted. By pressing the "Remove" button associated to the parameter type, the selected value will be removed from the choice list.
3. Select an existing value as the default value: To activate an existing base parameter value you must select the desired value in the choice list of the relevant parameter type (unfold the list via their expand button at the right and klick into the desired value). The selected value will be highlighted. By pressing the "Set Default" button associated to the parameter type, the selected value will be made to the default value. All activated values are shown in the "Actual Parameter Selection" dialog.
4. Changing an existing entry: To change an existing base parameter value you must select the desired value in the choice list of the relevant parameter type (unfold the list via their expand button at the right and klick into the desired value). The selected value will be highlighted. By pressing the "Edit" button associated to the parameter type, the selected value will be transferred to field "Selected Entry". In this field you can change the value according to your needs. By pressing the general button "Update Entry" the modified value will be transferred back to the choice list.
5. Reset the display fields: To reset all dialog fields press the "Remove All" general button. This will remove all entries of all base parameters already defined.

General button "Initial Help" presents a message, that reminds you, that you have - as the initial setup action - to define a value for each of the 3 base parameters and make it the default value.

General buttom "Exit" or the "X" (Exit) button at the right upper corner of the window closes the dialog.

top of chapter to content

### The Dialog to Setup the Project Parameters

Before you can work on a project with JadeIDE, you must first create it. This includes the definition of the parameters controlling the development work.

The dialog to setup the project parameter templates

The dialog is used to name a development project and to specify the required control parameters.

The dialog fields and their usage:

1. Project Package Name (Project Name): This field defines the project's java development package. The package name is used by JadeIDE also as the project name.
   To guarantee unique package names (e.g. important, if an applet is developed, that should be used in the public domain of the World Wide Web) you should follow the naming conventions established by Sun. Sun recommends to use a 3 part package name where the name components are separated by a period. The first name component is one of the domain designations commonly used in the internet, e.g. "com" for commercial, "org" for organization, or "uk" for United Kingdom. The second name component should be an abbreviation for the enterprise owning the product to be developed, e.g. "sun" for Sun Microsystems. The third name component should be an abbreviation for the application to be developed, e.g. "ide" for "integrated development environment". It is good practice to just use lower case characters and to ommit special characters.
2. Project Library: This field is used to specify the path to the project library, e.g. "C:\WORK\". Within this library the project package will be generated. The java source files and the class files will then be found in the lowest level directory of the hierarchy. Example: project name: "com.kur.ide", project library "C:\JadeIDE". The file specification for the source file "test.java" would than be "C:\JadeIDE\com\kur\ide\test.java".
   The directory name should be provided with a file separation character (Windows: "\", Linux: "/") at the end.
   The project directory may be evaluated via the file dialog, if an already existing directory should be used. Invocation of the file dialog via button "Find" located behind the input field.
   If the directory not yet exists, it can be created here by klicking the button "Create" located to the right of the input field.
3. Desired JAVA Library: This choice field provides the names of libraries containing a Java Development Toolkit. Only the top level name must be provided. Subdirectories must not be specified. JadeIDE generates the parameter templates for the Compiler, the Launcher, and the AppletViewer from the selected name. To do that, JadeIDE assumes, that the standard naming structure of the toolkit has not been changed. It is assumed, that the ".exe" files are located in the bin directory. If the toolkit is located in directory "C:\Development\jdk1.3.1\" the value for the BC_COMP parameter template would be generated as "C:\Development\jdk1.3.1\bin\javac.exe".
   For the project definition a name has to be selected. If the desired name is not already in the choice list, you can search for the JDK via button "Find" located to the right of the choice field. The evaluated directory name will be added to the list of directories and can now be marked for usage. (Note: you can only add new entries. If an entry is no longer valid, deletion must be done via the Base Parameter Maintenance dialog).
   Remember: the file dialog does not allow to just select a directory. To get a directory value back, you must select a file in this directory. JadeIDE will strip off the file name if it is not needed.
4. Class path extension: As project class path JadeIDE uses the project directory. If in addition JAR or ZIP archives are needed, the archives have to be named here.
   Via button "Find" located to the right of the input field you can search for the required archives using the system specific file dialog. Each selected archive will be appended to the already existing entry.
5. Compiler options: This field allows the specification of the desired compiler options. A detailed description of the valid options is given in the JDK tools documentation.
   Via button "Create" located to the right of the input field the most important options can be generated via a special generation dialog.
6. Runtime options: This field allows the specification of the desired runtime options. A detailed description of the valid options is given in the JDK tools documentation.
   Via button "Create" located to the right of the input field the most important options can be generated via a special generation dialog.
7. Main class: This field is used to define the application start class (the class comprising the main() method).
   Via button "Create" located to the right of the input field, the main class (respectively the JAR archive containing the start class) together with the invocation parameters can be generated via a special generation dialog.
8. Invocation parameters: This field is used to provide the required input parameters.
   If you have generated the main class entry via the special generation dialog the generated values are shown here.

The common buttons and their associated actions:

|  | Searches for a project definition using the name specified in field Project Package Name as search argument.
|  | Resets all input fields and choice lists of the dialog.
|  | Deletes the actually shown project definition.
|  | Changes the persistently stored project definition according to the values currently presented.
|  | Creates a new project definition using the currently displayed values. If required, the button "Open" will be enabled.
|  | The actually displayed project is opened. All activated values are shown in the "Actual Parameter Selection" dialog.
|  | The dialog window is closed.

top of chapter to content

### The Dialog to Define the Options for the Java Compiler

The dialog to define the "compiler options" appears, when the "Create" button to the right of field "Compiler options" has been pressed in the dialog to setup the project parameters. If at this moment a value is shown in this field this value is used to initialize the fields of the new dialog. This provides a convenient way to clone and then modify parameter values.

Are the initialization values not required or completely unacceptable, all fields can be reset to their default values by pressing the "Clear" button.

An option is selected by clicking into the selection field. Clicking the field again, deselects an already marked option.

For options which require a parameter value (Outp.Dir. and Sourcepath) the activation of the file dialog is supported in order to evaluate a path or a file name. The option is used, if the parameter textfield is not blank. Of course parameter text fields filled via a file dialog can be manipulated. This comprises the complete deletion of the field content.
Note: The sourcepath may contain several directories as well as ZIP and JAR archives. Multiple invocation of the file dialog is therefore allowed. Each evaluation result is appended to the already existing content, separated by a list separation character. A file dialog normally does only allow the selection of a file (and not of a directory) therefore you have to delete the file part of a result manually, if only a directory is required.

After the compiler and the desired options are selected, you must press the "Apply" button. This transfers the correctly assembled value into the field "Compiler options" of the "Dialog to Setup the Project Parameters". Here you can - if needed - complement the value by additional options, wich cannot be specified via the JadeIDE definition dialog.

Clicking the "Apply" button does not close the dialog window, because there may be modifications needed. The dialog window is closed either by clicking the "Quit" button or by clicking the "X" (Exit) button in the top right corner of the window.

top of chapter to content

### The Dialog to Define the Options for the Java Launcher

The dialog to define the "run options" appears, when the "Create" button to the right of field "Runtime options" has been pressed in the dialog to setup the project parameters. If at this moment a value exists in this field, this value is used to initialize the fields of the new dialog. This provides a convenient way to clone and then modify parameter values.

Are the initialization values not required or completely unacceptable, all fields can be reset to their default values by pressing the "Clear" button.

The dialog allows the specification of the most important options as defined for the JAVA.EXE launcher of the SUN JDK (Version 1.3 or better). The affect of the launcher options is described precisely in the SUN JDK tools documentation. Just let be mentioned the "DebugOptions". If marked, the value "-Xdebug -Xrunjdwp:transport=dt_shmem,server=y,suspend=n" will be inserted. The option "-Xnoagent" has to be inserted manually if needed and option "-Djava.compiler=NONE" may be specified as a "Property".

An option is selected by clicking into the selection field. Clicking the field again, deselects an alreay marked option.

The Java launcher can hold project specific properties required by a specific application. The properties are provided to the launcher via the -D option. There is no limit for the -D options and there is no specific sequence required. The dialog allows to prepare the -D options via the "Name" and "Value" text fields. The entered name and value will be appended to the value or the "Properties" text area in the form "-Dname=value", as soon as the "Add Prop." button has been pressed. Is a value erronous, it can be deleted by highlighting the erronous or unwanted character sequence and by pressing the "Del Prop." button.

After the desired options are selected, you must press the "Apply" button. This transfers the correctly assembled value into the field "Runtime options" of the invoking dialog. Here you can - if needed - complement the value by additional options, wich cannot be specified via the JadeIDE definition dialog.

Clicking the "Apply" button does not close the dialog window, because there may be modifications needed. The dialog window is closed either by clicking the "Quit" button or by clicking the "X" (Exit) button in the top right corner of the window.

top of chapter to content

### The Dialog to Define the Start Class and their required Parameters

The dialog to define the "start class" and "start parameters" appears, when the "Create" button to the right of field "Main class" has been pressed in the dialog to setup the project parameters. If at this moment a value is shown in the fields "Main class" and "Invocation Parameters" of the invoking dialog these values are used to initialize the fields of the new dialog. This provides a convenient way to clone and then modify parameter values.

Are the initialization values not required or completely unacceptable, all fields can be reset to their default values by pressing the "Clear" button.

The dialog allows either the selection of the desired Java start class (the project class with the "main()" method) or the selection of a user archive (.jar file). These selections are mutually exclusive. If an archive is selected, the manifest file of this archive must provide the name of the start class. For both alternatives the eventually required start parameters expected by the "main()" method can be defined. Of course these parameters are project specific.

The start class and the user archive can be selected via the operating system specific file dialog. This dialog is invoked, when you press the "Browse" button behind the field. A value provided by the file dialog of course can be manipulated using the standard text manipulation functions. This includes deletion of a value.

If an invocation parameter happens to be a file or directory, you can use the "Append File to Args" button to search for the file specification using the operating system specific file dialog.

The "Erase Sel. Argument" button deletes a highlighted sequence from the "Arguments" text area.

After the start class or the archive and the invocation parameters are selected, you must press the "Apply" button. This transfers the correctly assembled values into the fields "Main class" and "Invocation parameters" of the invoking dialog. Here you can - if needed - complement the value.

Clicking the "Apply" button does not close the dialog window, because there may be modifications needed. The dialog window is closed either by clicking the "Quit" button or by clicking the "X" (Exit) button in the top right corner of the window.

top of chapter to content

### Presentation of Actually Activated Parameter Values

To check, which parameter templates are currently active, you can use the dialog named "Actual Parameter Selection". This dialog is invoked via menu item "Display Selected Values" in the "File" menu of the JadeIDE main window.

top of chapter to content

#### Annotation regarding the JadeIDE.INI file

Never manipulate file jadeide.ini with an editor. This very likely will make this file unusable because the file contains binary pointers which become invalid if a length change appears within the file.

top of chapter to content

## Working with JadeIDE

As soon as all desired and required command templates have been defined during the "setup" phase, you can start working with JadeIDE.

The various actions performed during project development are controlled via the menus and menu items of the JadeIDE main window. It can be distinguished between two major groups of actions:

1. Functions supporting project work.
   These are: the display of the documentation of Java APIs (your own and the SUN APIs),the display of the content of the system clipboard, and the invocation of a HTML editor, if HTML files (e.g. your help files) have to be manipulated.
2. Actions performed during the development process
   These are: the initial creation of project classes, the manipulation of classes, the generation of project specific dialog frames, the generation of HTML files to invoke applets, the compilation of classes (one by one or all classes of a project), the generation of the Java project documentation (JavaDoc), the test of the developed application, and finally the cancellation of actions (e.g. if a test went into a loop).

top of chapter to content

### Work on Projects

The function "Work on Projects" is used to prepare and activate the command templates required to work on the project and to build the menu items of menu "Java Files" and menu "HTML Files".

When the "File -> Work on Projects" menu item is selected a "Selection dialog" opens presenting all existing projects. Projects are identified by their package name.

Select a package name from the list of available projects and press the button.
The project specific parameter values are tested against the currently existing environment and activated if there is no error. The project's ".java" files are placed into menu "Java Files", and the project's ".htm(l)" files are placed into menu "HTML Files". If the "JADE Parameter Selection" window is open, the window content is updated.

In textfield "Act.package" of the JadeIDE main window, the name of the selected project is shown as actual project.

As long as for a package (project) no ".java" files are found in the package folder automatically a template for a start class (named $StartClass) is generated. This template than can be modified according to the project needs.
Note: As long as $StartClass is the only ".java" file in the package folder, a new start class will be immediately generated, if the old $StartClass file is deleted.

Via the button of this dialog you can also invoke dialog Update Development Project if the parameters need to be modified before the project gets opened.

### Close Project

The function "Close Project" ("File -> Close project") is used to deactivate the selected project. Menu item "Functions -> Show Java API Doc", the menus "Java Files", and "HTML Files" are disabled and the textfields of the main window are cleared. All actually selected command templates are deselected.

top of chapter to content

### The JadeIDE Functions

The "Functions" menu of the JadeIDE main window shows the menu items to invoke the supporting functions.

#### Start HTML-Editor

The function "Start HTML Editor" opens the HTML Editor you have specified via the JadeIDE program invocation parameters (Parameter HTML=......).

#### Show JAVA API Doc

The function "Show Java API Doc" is used to invoke the browser you have specified via the JadeIDE program invocation parameters (Parameter BRWS=.....) to present the SUN Java JDK API documentation you have specified via the JadeIDE program invocation parameters (Parameter JAPI=.....).

#### Show Package API Doc

The function "Show Package API Doc" is used to invoke the browser you have specified via the JadeIDE program invocation parameters (Parameter BRWS=.....) to present the project's JavaDoc HTML-file (if one has been generated with the "Generate JavaDoc" function provided in the "Project Actions" menu).

To show a package API, select a package name from the list of available packages and press the button.
The browser opens the associated API documentation file.

#### Show clipboard content

The function "Show clipboard content" opens a window, that shows in a text area the actual content of the system clipboard. This allows easy verification of what would be inserted at the caret position during the next insert operation.
Via button you can erase the content of the system clipboard.

### The JadeIDE Project Actions

The menu "Project Actions" of the JadeIDE main window shows the menu items for the real project work actions. This menu is structured into 4 sections. The first section comprises all actions which are single file (class) related, the second section comprises all project related actions, the third section provides the command to cancel ongoing processes, and section 4 handels the archive related actions.

#### Create & Initialize File

To create a new source file the "Create & Initialize File" Dialog is used:

The dialog allows to generate and initialize project files of type ".java", ".html", and type ".jct". To generate a new file perform the following actions:

1. Enter the name of the new class/file into field "File/Class name"
2. Select the file type via the "File type" checkboxes. Allowed are .java, .html, and .jct
   The selected file type determines the initialization type, but this recommendation can be changed.
3. Select the initialization template. Allowed is:

   none |  | no initialization or only rudimentary initialization
   default |  | initialize it from a JadeIDE default template. For a ".html" file the "Generate HTML File" dialog is invoked to generate the initialization for an applet invocation.
   copy from |  | The initial file content is copied from the specified file

4. Click on the button. This will create and initialize the new file. The new file is immediately added to the list of the corresponding menu. The name of the newly created class is transferred to the active file field of the JadeIDE main window and becomes by that the active file and can be edited immediately.

The button resets the dialog fields and the button closes the dialog window.

#### Delete a Project File

The "Delete a Project File" dialog is used to delete project files of type .java, .html, and .jct. The dialog provides a choice field for each type, which is filled with the file specifications of all existing project files of this type.

To delete a file from the project folder or templates folder the following actions have to be performed:

1. Select a choice field entry representing the file to be deleted by exploding the choices and clicking onto the desired entry. The selected entry is moved to the "selected file" field at the bottom to allow to verify the selection.
2. Click on the button. You will be asked to confirm the deletion action by clicking the button a second time. A message is displayed showing the deletion result. The "Act class file/Actual URL" field will be cleared and the menu "Java Files", "HTML Files", respectivly "Code Templates" is automatically updated if the file has been successfully deleted.
   Note: if a file to be deleted is open in a JadeEditor window the editor window is closed before the file is deleted. This is not true, if an external editor is used. In this case the external editor may recreate the file.

To close the dialog window click the button.

#### Edit with JADE-Editor

To edit a file with the JADE-Editor the following actions have to be performed:

1. From the list of files provided by the menus "Java Files" or "HTML Files" in the JadeIDE main window select an entry by clicking on it with the left mouse button. For Java files you can also use the file dialog to select a file. The name of the selected file will be displayed in the "Act class file/Actual URL" field of the JadeIDE main window and by that made to the active file.
2. If no external editor is specified, the file will be immediately presented by the JadeEditor. If an external editor is specified, click on the "Edit with JADE-Editor" menu item of the JadeIDE main window, or alternatively click on the "edit" button in the information area of the JadeIDE main window. This will bring up the JADE-Editor to display the content of the selected file. If the selected file is already open in a JADE-Editor session, the relevant editor window will be brought to front. Multiple display of the same file is not possible with the JADE-Editor. A second instance of the file can be displayed using an external editor, but this second instance should only be used for viewing, because changes made in an external editor will not be saved by the JADE-Editor. This may result in conflicts or provided input could be lost.

#### Edit with external Editor

To edit a file the following actions have to be performed:

1. From the list of files provided by the menus "Java Files" or "HTML Files" in the JadeIDE main window select an entry by clicking on it with the left mouse button. For Java files you can also use the file dialog to select a file. The name of the selected file will be displayed in the "Act class file/Actual URL" field of the JadeIDE main window and by that made to the active file.
2. Click on the "Edit with external Editor" menu item of the JadeIDE main window. This will bring up the external source file editor and display the content of the selected file.

#### Compile selected File

To compile a source file (which is represented by the class name) the following actions have to be performed:

1. From the list of files or the file dialog offered by the menu "Java Files" in the JadeIDE main window select a file if the file to compile is not already the active file. The name of the selected file will be displayed in the "Act class file" field of the JadeIDE main window and by that made to the active file.
2. To start the compilation click on the "Compile selected File" menu item of the JadeIDE main window, or alternatively click on the "C" button in the information area of the JadeIDE main window. After completion of the compilation a message is displayed showing the compilation result. Finally a "Messages and Errors" dialog is displayed to show messages generated during the compilation (messages: max. 16 K bytes or up to about 100 entries; errors: max 32 K bytes or up to about 150 entries).

#### Generate Window Frame

Clicking on menu item "Generate Window Frame" in menu "Project Actions" of the JadeIDE main window opens the Generate a Window Frame dialog.

#### Generate Dialog Window

Clicking on menu item "Generate Dialog Window" in menu "Project Actions" of the JadeIDE main window opens the "Dialog Window Generation" dialog

#### Compile active Project

The function "Compile active Project" is used to compile all classes of the active project sequentially. If a compilation error comes up for a class, a "Messages and Errors" dialog window is opened. To keep valid the relationship between the compiled class and the error list, more than one "Messages and Errors" dialog can be open at a time. This allows convenient correction of all errors detected. To correct a source file you can use the "Edit" button directly from the "Messages and Errors" dialog.

#### Generate Java Doc

Clicking on the "Generate Java Doc" menu item in menu "Project Actions" on the JadeIDE main window starts the Java Doc generation process for the active package (project).

The Java documentation will be stored in a folder inside the project folder. The foldername will be generated from the last part of the project specification appended by the suffix "Doc". Example: project id: com.kur.test, resulting folder name: testDoc. In this folder you will find the start file "index.html".

#### Run Applet

To run the project's top level class containing the init() method as an applet via the currently selected appletviewer the following actions have to be performed:

1. Select the required URL from the list of URLs provided by the "HTML Files" menu of the JadeIDE main window.
2. Click on the "Run Applet" item of menu "Project Actions" in the JadeIDE main window. The AppletViewer is invoked and will present the applet. After completion of the applet (close or quit) a message is displayed showing the execution result. Finally a "Messages and Errors" dialog is displayed to show messages generated during the execution (messages: max. 16 K bytes or up to about 100 entries; errors: max 32 K bytes or up to about 150 entries).

#### Run Application

To run the project's top level class containing the main() method the following actions have to be performed:

1. Verify, that the correct main class and the correct parameters are selected via the "MainClass" parameter.
2. If necessary, correct the values - this might be necessary, if the controlling class has been changed with respect to the accepted parameter values.
3. Click on the "Run Application" item of menu "Project Actions" in the JadeIDE main window. The application launcher will start the application. After completion of the application a message is displayed showing the execution result. Finally a "Messages and Errors" dialog is displayed to show messages generated during the execution (messages: max. 16 K bytes or up to about 100 entries; errors: max 32 K bytes or up to about 150 entries).

#### Cancel active action

To cancel a running compilation or execution click on the "Cancel active action" item of menu "Project Actions" in the JadeIDE main window. After termination of the compilation or execution a message is displayed showing the execution result. Finally a message and error dialog is displayed to show messages generated during the compilation or execution (messages: max. 16 K bytes or up to about 100 entries; errors: max 32 K bytes or up to about 150 entries).

#### Maintain Archives

To maintain the existing archive folders of a project you must click the "Maintain Archives" menu item.

This opens a window with the title "Maintain existing archives" which shows all potential archive folders of a project in ascending order - that is in the sequence of their creation: oldest archive on top, most recent archive at the bottom of the list.

By marking an archive specification in the offered list and by clicking the "Delete" button, the related folder will be deleted. Caution: there is no confirmation of the deletion action requested!

The window is closed via the "Quit" button or via the "X" (Exit) button in the upper right corner of the window.

#### Archive current project

To persistently archive (backup) an actual snapshot of a development project's source files you have to click the "Archive current project" button.

An archive folder will be created as a subfolder in the actual project folder. The folder is named with the timestamp that indicates the generation time. The format is YYYYMMDDHHMM - year, month, day, hour, minute. Into this archive folder all actually existing source files of the project will be copied (all files with the extension .jav, .java, .htm, .html). The successful generation of the archive will be signalled and recorded in the session protocol.

#### Restore from archive

To restore previously archived source files of a project from an existing archive folder in order to activate them for the actual project work you have to click the "Restore from archive" button.

A window with the titel "Restore project from selected archive" opens. This window shows all potential archive folders of a project in ascending order - that is in the sequence of their creation: oldest archive on top, most recent archive at the bottom of the list.

By marking an archive in the list and by clicking the "Restore" button all source files (files with extension .jav, .java, .htm, .html) stored in the archive will be copied to the actual project folder. Existing files with the same name will be replaced without further warning. All other files in the project folder (e.g. all .class files) will be kept. If the .class files have to be made consistent with the restored source files a full project compilation has to be performed.

The button "FileDialog" opens the platform specific file dialog. With this file dialog you can select a single file that has to be restored. It is allowed to switch to a different folder. The selected file from the archive folder shown in the file dialog is copied to the project folder, as soon as the "Restore" button is pressed. Again no confirmation of the action is requested!

The window is closed via the "Quit" button or via the "X" (Exit) button in the upper right corner of the window.

top of chapter to content

### The Dialog to Generate a HTML File for the Applet Invocation

The "Generate HTML File" dialog is used to determine the parameters needed to initialize the HTML file in order to allow the applet invocation via an appletviewer or a web-browser.

The "Generate HTML File" dialog is invoked from the JadeIDE main window via menu "Project Actions" and menu item "Create/change HTML file". The dialog provides the following fields:

File name
  Field to provide the name of the HTML File. The file must have the file type ".htm" or ".html".
CodeBase
  Field to specify the folder or server where the applet class resides.
JAR Archive(s)
  Field to provide the required JAR archive(s) for the applet to be invoked.
  The path-specification should be relative to the HTML file. JadeIDE assumes, that the JAR archives reside in the project folder or in one of its subfolders because JadeIDE stores the generated HTML file in the project folder. If more than one JAR archive has to be specified, the entries must be seperated by a "," (comma). Via the button [... ] in front of the field the operating specific file dialog can be invked to select the required JAR archives. To select more than one JAR archive, invoke the file dialog several times. Select only one archive per invocation.
  (Note: not all Browsers support the "archive=" keyword in the "applet" HTML-Tag.)
Width
  Field to specify the width of the window in which the applet shall be presented.
Height
  Field to specify the height of the window in which the applet shall be presented.
Hor.space
  Field to specify the horizontal space between the applet window and its surrounding.
Vert.space
  Field to specify the vertical space between the applet window and its surrounding.
Alt. text
  Field to specify the text which shall be presented by the browser, if the applet cannot be invoked by it.
Align
  Choice to specify how the applet shall be positioned in the provided window.
Parm.List
  Text list showing the currently specified applet parameters and their values.
Parm.Name
  Field to specify the name of an applet parameter.
Parm.Value
  Field to specify the value of the applet parameter named in the "Parm.Name" field.

The "HTML File Generation" dialog offers the following functions:

#### Reset the screen field content [Reset]

When the "Reset" button is pressed, all dialog fields are reset to their initial (default) values.

#### Add a new parameter [AddParm]

To add a new parameter the following actions have to be performed:

1. Enter the name of the parameter to be added in the Parm.Name field.
2. Enter the value of the parameter to be added in the Parm.Value field.
3. Press the "addParm" button. The parameter name and value will be transferred into the "Parm.List" field and the input fields are cleared.

#### Move selected parameter one up [moveUp]

To move a specified parameter in the list of defined parameters one position up, the following actions have to be performed:

1. Mark the parameter entry to be moved by clicking on it with the left mouse button.
2. Press the "moveUp" button. The entry will be moved up by one position if not already at the top of the list.

#### Move selected parameter one down [moveDown]

To move a specified parameter in the list of defined parameters one position down, the following actions have to be performed:

1. Mark the parameter entry to be moved by clicking on it with the left mouse button.
2. Press the "moveDown" button. The entry will be moved down by one position if not already at the bottom of the list.

#### Delete selected parameter [DelParm]

To delete a specified parameter in the list of defined parameters, the following actions have to be performed:

1. Mark the parameter entry to be deleted by clicking on it with the left mouse button.
2. Press the "Delete" button. The entry will be removed from the list of defined parameters.

#### Save and Exit

When the "Save and Exit" button is pressed, the provided input is checked for errors. If an error is detected, a message about the field in error is presented so that the error can be corrected.
If everything is OK the HTML file content is generated. If needed, the file is generated and the generated text is inserted into the file. If the file is not new, the existing content is overridden without further notice.

top of chapter to content

### The Dialog to Generate a Window Frame

The dialog to generate the source code for a Java "window Frame" is used to define the parameters needed to control the generation process. The dialog is invoked from the menu "Project Actions" of the JadeIDE main window via item "Generate Window Frame" (see: The JadeIDE Project Actions).

Generated will be the code template for the window frame including the menu bar, the various menu entries as well as the menu items for each menu entry.
Not generated will be the content of the panel associated to the window frame. Just a single "TextField" will be added. This text field is used to show a message reflecting the result of a menu selection action. If there is a panel needed containing standard Java AWT or Swing constructs (TextField, TextArea, Choice, Button, etc. respectively JTextField, JTextArea, JButton, etc.), the layout of the panel can be generated by using the dialog generation process. The relevant statements can than be taken over (using cut & paste) to define the panel.

#### Preparation of the Generation

To prepare the generation of a "Window Frame" the desired menu structure should be comletely sketched out. That means, all menu names, all menu item designations including the characters to be used for keyboard shortcuts, should be known, and the sequence of the menus and menu items should be determined.

#### The Dialog "Generate Window Frame"

The dialog window provides all required input fields as well as the buttons to trigger the offered actions.

The dialog provides the following fields:

Window name
  Field "Window name" defines the name of the "Window Frame" class. The name should follow the established naming conventions for Java classes.
use Swing
  Via the checkbox "use Swing" is definied, whether Swing components should be used (box checked) or not (box not checked).
  Note: Swing components are so called "lightweight" components. That means their standard properties are not as firm predefined as this is the case with their correspondent AWT components. These standard properties can be defined by the developer to a much larger extent. But to gain this flexibility you have to invest considerably more programming effort.
Window width
  The "Window width" field defines the horizontal range of the frame window in pixels. This value is the initialization value. All windows are generated to be expandable. If the window has to be non expandable, the generated source code has to be modified.
Window height
  The "Window height" field defines the vertical range of the frame window in pixels. This value is the initialization value. All windows are generated to be expandable. If the window has to be non expandable, the generated source code has to be modified.
Defined menues
  The choice field "Defined menues" presents all currently defined main menu entries. The sequence of the entries determines the sequence of the menu entries in the menu bar from left to right (first entry = leftmost entry, last entry = rightmost entry).
Menu items
  The choice field "Menu items" presents all currently defined menu items of the main menu entry selected in the "Defined menues" choice. The sequence of the entries determines the sequence of the menu items in the drop down list from top to botom (first entry = item at top of list, last entry = item at bottom of list).
New entry
  The name of a new main menu entry or menu item that should be defined must be provided in field "New entry". The kind of usage of this entry is determined by the button pressed afterwards.
Shortcut
  In field "Shortcut" the character has to be provided which together with the "Ctrl" key will trigger the associated function via a keyboard entry. Only a single character is allowed. A shortcut can only be provided for menu items, for main menu entries this field is ignored.
  Note: Generated is only the "Ctrl-Char" key sequence. If you want to use different sequences (e.g. "Alt-Char") you have to modify the generated code accordingly. The same is true if you want to use function keys (F1...F24). If you want to insert separation lines, these lines also have to be inserted manually.

The dialog provides the following functions:

move up
  Via the "move up" button you can reposition an existing entry in the list of entries. The entry is moved up one position, if it is not already at the top of the list.
move down
  Via the "move down" button you can reposition an existing entry in the list of entries. The entry is moved down one position, if it is not already at the bottom of the list.
remove
  Via the button "remove" the marked item in the list can be deleted. If the entry has dependent entries, the dependent entries will be removed also.
Add as menu
  Via button "Add as menu" the entry in field "New entry" will be inserted in the list of "Defined menues". The entry is inserted directly after the marked entry in choice field "Defined menues". If no entry has been explicitely marked, the last added entry is considered to be the marked entry.
Add as item
  Via button "Add as item" the entry in field "New entry" will be inserted in the list of "Menu items". The entry is inserted directly after the marked entry in choice field "Menu items". If no entry has been explicitely marked, the last added entry is considered to be the marked entry.
Clear
  Via button "Clear" all input fields and choices are reset to their default values. The complete set of already entered values is discarded by this action.
Quit
  When the "Quit" button is hit, the dialog window is closed. The existing values are not saved for future use. If no code generation has been performed, these values are lost.
Test window
  Via the button "Test window" a process is triggered to generate the source code of the envisaged window using the parameters defined so far. After a successful compilation the result is presented in a separate window. It is not required to provide a "window name" for this process and the window dimensions need not to be finally defined. The generated test display may rather be used to evaluate the proper window width and height. The actual window dimensions are presented in the header bar of the dialog. You may need to experiment with the window size especially than, if not all defined main menu entries are shown in the dialog. If the initial window size is not sufficient to present all entries, some entries may be hidden. They will show up as soon as the window size has been sufficiently increased.
Generate code
  Via the button "Generate code" the final source code generation process will be triggered. This function needs a "Window name" and the final window dimensions should be determined. The generated source code will be placed into the folder of the active project and the dialog class will be placed in the list of available classes of this project. The genereated source code now can be manipulated with the standard development functions (edit, compile, ...).

#### Example of a defined Window Frame

The following data elements will generate the "Window Frame" shown below - left (or top) exploiting standard AWT components and right (or bottom) exploiting Swing components:

         Window name:       TestWindow
         Window width:      400
         Window height:     136
         New entry:         File   (with button "Add as menu")
                            New entry:     New            Shortcut: N
                                           Open                     O
                                           Close                    C
                                           Exit                     X
                            (with "File" selected and "Add as item")

         New entry:         Edit        (with "Add as menu")
                            ........................
         New entry:         View        (with "Add as menu")
                            ........................
         New entry:         Help        (with "Add as menu")
                            ........................

Note: the screenshots show "Strg" instead of "Ctrl" for the accelerator key, this is because a German keyboard is defined in my installation. In a US or UK Environment "Ctrl" should show up.
(I will very much appreciate it, if somebody can send me original English screenshots.)

top of chapter to content

### The Dialogs to Generate "Dialog Windows"

The dialogs to generate the source code for "dialog windows" are used to define the parameters needed to control the generation process. The start dialog for the generation is invoked from the "Project Actions" menu of the JadeIDE main window via item "Generate Dialog Window" (see: The JadeIDE Project Actions). The sub dialog is invoked from a button within the start dialog window.

The following scheme shows the principle of the dialog window generation:

1. Determine the base parameters for the dialog class
  Specify the window name (that is the class name) as well as the window width and window height (in pixels) for the dialog window.
2. Split up the dialog window into separate rows.
  The dialog window is split up into horizontal sections (rows). Each row represents a container for the information to be shown in this row (that is the field labels and the input fields).
3. Definition of the row content
  For each row the information fields have to be defined in the sequence, in which they shall be shown in the row. Each row may contain one or more than one field, there is theoretically no upper limit. The fields defined on this first level (the row level) will be arranged using a GridBagLayout. A defined field can again function as a field container (container nesting). Such containers will be implemented as "Panels" with a "GridLayout". The fields contained in such a container are added to it as GridLayout elements.

#### The Start Dialog

The start dialog is used to define the base parameters (window name and window dimension) as well as the rows of the dialog window. The start dialog allows also to display the generated window for testing and verification. Finally it is used to trigger the final source code generation process.

The start dialog provides the following fields:

Window name
  Field "Window name" defines the name of the dialog class. The name should follow the established naming conventions for Java classes.
use Swing
  Via the checkbox "use Swing" is definied, whether Swing components should be used (box checked) or not (box not checked).
  Note: Swing components are so called "lightweight" components. That means their standard properties are not as firm predefined as this is the case with their correspondent AWT components. These standard properties can be defined by the developer to a much larger extent. But to gain this flexibility you have to invest considerably more programming effort.
width
  The "width" field defines the horizontal range of the dialog window in pixels. This value is the initialization value. All windows are generated to be expandable. If the window has to be non expandable, the generated source code has to be modified.
height
  The "height" field defines the vertical range of the dialog window in pixels. This value is the initialization value. All windows are generated to be expandable. If the window has to be non expandable, the generated source code has to be modified.
Window row list
  The field "Window row list" shows all rows already defined for the window. The sequence of the entries defines the presentation sequence in the window (first entry at the top, last entry at the bottom).
Window row name
  The field "Window row name" provides the name of a row to be added to the list of rows.

The start dialog provides the following functions:

Move up
  Via the "Move up" button you can reposition an existing entry in the list of rows. This results in the repositioning of the row in the window. The entry is moved up one position, if it is not already at the top of the list.
Move down
  Via the "Move down" button you can reposition an existing entry in the list of rows. This results in the repositioning of the row in the window. The entry is moved down one position, if it is not already at the bottom of the list.
Remove
  Via the button "Remove" the marked item in the "Window row list" (and by that the related window row) can be deleted.
Add row
  Via the button "Add row" the entry in the field "Window row name" will be added to the list of row names. The entry will be placed immediately behind the entry marked in the list. If no element has been explicitely marked, the last added element is considered to be the marked element.
Fill row
  Via the button "Fill row" the secondary dialog will be triggered. This dialog is used to fill in the information elements to be shown in the related row.
Compile and Test
  Via the button "Compile and Test" a process is triggered to generate the source code of the envisaged dialog window using the parameters defined so far. After a successful compilation the result is presented in a separate window. It is not required to provide a window name for this process and the window dimensions need not to be finally defined. The generated test display may rather be used to evaluate the proper window width and height. The actual window dimensions are presented in the header bar of the dialog. You may need to experiment with the window size especially than, if not all defined elements are shown in the dialog. If the initial window size is not sufficient to present all elements, some elements may be hidden. They will show up as soon as the window size has been sufficiently increased.
Generate Dialog
  Via the button "Generate Dialog" the final source code generation process will be triggered. This function needs a "Window name" and the final window dimensions should be determined. The generated source code will be placed into the folder of the active project and the dialog class will be placed in the list of available classes of this project. The genereated source code now can be manipulated with the standard development functions (edit, compile, ...).

Note: If the start dialog for the "dialog window" generation is closed, all parameters defined for an actual generation will be discarded. It is (currently) not planned to save the provided input, because the number of information to be provided to generate a dialog window is so modest and the whole generation process is so short, that it always can be completed.

#### The Dialog to Fill In the Information Fields (socondary dialog)

The second dialog is used to determine the information fields which should be contained in a information group. Information group may be a window row, but it also could be a so called "container". A container is a means to group somehow related information fields (e.g. a group of buttons).

The secondary dialog contains the following information fields:

Container name
  The field "Container name" determines the name of an information group to be defined (row or container).
Element list
  The field "Element list" shows all data elements with name and type that are already defined for the group. The sequence of the entries defines the presentation sequence of the elements in the group (from left to right). If an entry is marked, the fields "Element type", "Element name", and "Field width" will be filled accordingly.
Element type
  The field "Element type" provides all currently available element types for selection. Available are currently:
  1. Button - a button is labeled with the element name value.
  2. Canvas - an area to which you can draw (paint) geometric elements (lines, circles, boxes,...) and text. To paint to a canvas you must subclass it!
  3. Checkbox - binary selection with the values "on" and "off".
  4. Choice - An expandable list of text items. The first field always shows the selected item.
  5. FlowPanelxxxx - A means to group somehow related information elements. xxxx defines the arrangement of the elements in the panel. Possible are: xxxx = Left, xxxx = Right, and xxxx = Center arrangement.
  6. GridPanel - A means to group somehow related information elements. The arrangement is done using a grid!
  7. Label - Normally used to identify a data input field. Presented is the content of field "Elemente name".
  8. List - A list of selectable text items.
  9. TextArea - Multi column and multi line text input and presentation field. A TextArea will always be generated with scroll bars at the left and the bottom and with input set to "enabled". If this is not desired, the source code has to be reworked after the final generation.
  10. TextField - Multi column but single line text input and presentation field. A TextField will always be generated with input set to "enabled". If this is not desired, the source code has to be reworked after the final generation.
Element name
  Field "Element name" defines the name of the information field. The name should follow the established naming conventions for Java data fields. Element names with embedded blanks are allowed in principle, but embedded blanks will be replaced by underscores in order to avoid compilation errors.
Field width
  The field "Field width" is a multi purpose field. Together with element types "TextArea" and "TextField" it is used to provide the desired field width. This field width has influence on the space needed by the field on the screen, but it does not determine the number of allowed input characters.
  Together with element type "Checkbox" the field is used to determine the initial status of the checkbox (checked or unchecked). According to that only the values "0" for "unchecked" and "1" for "checked" are allowed.

The socondary dialog provides the following functions:

Move up
  Via the "Move up" button you can reposition an existing entry in the list of elements. The entry is moved up one position, if it is not already at the top of the list.
Move down
  Via the "Move down" button you can reposition an existing entry in the list of elements. The entry is moved down one position, if it is not already at the bottom of the list.
Remove
  Via the button "Remove" the marked item in the "Element list" (and by that the related data element) can be deleted.
Change Element
  Pressing the button "Change Element" will overwrite the selected entry in the "Element list" with the current value of the field "Element name" concattenated with the currently selected "Element type".
Add Element
  Via button "Add Element" the actual content of field "Element name" concattenated with the currently selected "Element type" will be added to the "Element list".The entry will be placed immediately behind the entry marked in the list. If no element has been explicitely marked, the last added element is considered to be the marked element.
Fill Container
  Via the button "Fill Container" an additional secondary dialog will be triggered. This dialog is used to fill in the information elements to be shown in the related container. This function is only valid, if a "Container" item is marked in the list of elements. In principle there is no limit for "Container nesting".

### Hints for the Generation of Dialg Windows

To generate source code for dialog windows you should follow the following scheme:

1. Sketch out the arrangement of the information fields of the dialog window and determine the desired element names. The desired window rows should be visible.
2. Group the elements for each row. Define the containers and if required the potential sub-containers.
3. Enter the relevant information into the start dialog.
4. Enter the relevant information into the secondary dialog. If containers are defined: enter the relevant information for containers and sub-containers.
5. Perform a test generation and a test display.
6. Determine the optimal size of the window by moving the window borders in and out. You have to experiment with the window size until all defined elements are shown.
7. If required, modify the layout by modifying the field width of elements or by changing the assignment of elements to containers.
8. Enter the optimal window width and window height into the fields "width" and "height" of the start dialog.
9. If the field arrangement satisfies you: enter the window name (if not already provided) and trigger the final source code generation.
10. Perform required rework.
    It might be needed: to reposition the automatically provided message field, to redefine the fields editability [setEditable()], to change the weighting of the width and height of fields [gbc.weightx, gbc.weighty], to insert not supported components, to change the layout of containers (e.g. to FlowLayout - caution! changing the layout type considerably affects the field presentation),.....
11. Perform required additions:
    In any case required are: the provision of the appropriate "fill" values for defined "Choices" and the definition of the required "actions" for the defined "Buttons" [handleXXXXXButton()].

Example

The following parameters generate the dialog shown below - left (or top) exploiting standard AWT components and right (or bottom) exploiting Swing components!

    Start dialog:
                    width: 325, height 300; add rows: R1, R2, R3, R4, R5
    Secondary dialog:
                    for R1: Label,Field 1; TextArea,Field_1,32;
                    for R2: Label,Checkmarks;  GridPanel,GP1;
                            for GP1: CheckBox,Box_1,0;
                                     CheckBox,Box_2,0;
                                     CheckBox,Box_3,1;
                    for R3: Label,Field 2; TextField,Field_2,32;
                    for R4: Label,Field 3; Choice,Field_3;
                    for R5: GridPanel,GP2;
                            for GP2: Button,Button_1;
                                     Button,Button_2;
                                     Button,Button_3;

top of chapter to content

## The JADE-Editor

The JADE-Editor is an editor, which has been especially developed for programmers writing Java source code. The JADE-Editor is seemlessly integrated into JadeIDE and is the preferred editor of this development environment. The editor is designed to provide the desirable functionality rather than for nice appearance. This is to keep the editor small and by that (although completely written in Java) make it reasonably fast.

The JADE-Editor window comprises a menu bar, a tool bar at the left window border, a source text area, a (input protected) line number area and (in the lower left corner) a field, which presents the position of the mouse pointer (not to confuse with the caret position) in the source text. The first number is the line number the mouse pointer is in, and the second number is the character position in the text line. The maximum value for a character position is the actual line length.

Note: The caret position is counted from the beginning of the text. It tells therefore the position of a character in the source text. The first character of a text is located at caret position 0, the last one at caret position = text length - 1.

top of chapter to content

### The Functions of the File Menu

Via the editors file menu the save, print and exit functions are invoked. The following picture shows the file menu:

#### Save (also included in the tool bar)

With the "Save" function the actually presented source text will be persistently stored on a storage media. This function also removes the remark about unsaved modifications in the title bar of the window.

#### Save all and Compile this (also included in the tool bar)

With the "Save all and Compile this" function the actually presented source text of all currently open JADE-Editor windows will be saved and than the compilation of the class presented in the window, that has triggered the action is started. This provides a convenient way to trigger final and intermediate compilations e.g. to detect still existing coding errors. Errors and messages are presented in the JadeIDE windows for Standard-Out and Standard-Error. From the "Standard Error" window you directly can branch to the statements on error. You just have to click into the relevant error message block and then press the "Goto Error" button. This will position the erronous line at the top of the JadeEDIT window displaying the Java source text. If the erronous class is currently not displayed in a Jade-Editor window a editor window is opened automatically, but in this case the source text is presented starting from line 1. Therefore you have to do the action again to position the source text to the erronous line.
Function "Save all and Compile this" also removes the remark about unsaved modifications in the title bar of the window.
Caution: Source text opened and still presented via an external editor will not be saved, even if this source text has been modified!

#### Select Paper Format for Print Output

The "Select Paper Format" function shows a submenu presenting the available paper sizes. The submenu is used to select the desired paper size. Currently supported a the 6 most commonly used paper sizes. These are

- DIN A 4 Portrait (210 x 297 mm),
- DIN A 4 Landscape (297 x 210 mm),
- US Letter Portrait (207 x 279 mm bzw. 8.5 x 11 inch),
- US Letter Landscape (279 x 207 mm bzw. 11 x 8.5 inch),
- US Legal Portrait (207 x 356 mm bzw. 8.5 x 14 inch)
  and
- US Legal Landscape (356 x 207 mm bzw. 14 x 8.5 inch).

#### Print Preview

Function "Print Preview" allows to verify the print output before printing. The dialog allows to browse through the output via the (red arrow) buttons of the tool bar. Supported are: first page, last page, previous page, and following page.

The window of the dialog can be resized. The print output will be adjusted to the actual size of the window.

You can start the actual printing from the tool bar. Available are: print all pages, and print currently presented page. With the "Exit" button the dialog is terminated without triggering a print action.

..........
..........

#### Print the Document (also included in the tool bar)

Function "Print the Document" triggers the printing of a Java source file. To select a printer the system specific "Print" dialog is presented. This "Print" dialog also allows to reroute the output to a file and to specify the number of copies to be printed.

Each printed page shows in the header the path and the filename of the printed class. In the footer you get the page number and the exact printing time.

#### Generate HTML Output

Function "Generate HTML Output" generates a HTML formatted form of the Java source file. This file can be viewed with a WEB-Browser.

#### Quit (no Save)

With the "Quit (no Save)" function the editor session is terminated without saving the actually presented source text persistently. By this it can be avoided that a corrupted source text is persistently saved to disk. On the persistent storage the source text stored during the last successful save operation will be kept.
Caution: If the function "Save all Compile this" has been invoked from a different JADE-Editor window, this is the last performed successful save operation.

#### Exit with Save

With the "Exit with Save" function the actually presented source text will be persistently stored on a storage media and the editor session is terminated. The termination actions triggered via the windows system menu and via the exit button in the title bar perform this action as well.

top of chapter to content

### The Functions of the Edit Menu

Via the Edit-Menu of the editor a number of edit and navigation functions to manipulate the source text are invoked. They are shown in following picture:

#### Undo (also included in the tool bar)

Function "Undo" sets back a performed edit action. Multiple resets are supported.

#### Redo (also included in the tool bar)

Function "Redo" re-establishes a undone edit action. Multiple redos are supported.

#### Cut (also included in the tool bar)

With the "Cut" function the actual selection (the light blue highlighted text) of the source text is copied to the System Clipboard and removed from the actually presented source text.

#### Copy (also included in the tool bar)

With the "Copy" function the actual selection (the light blue highlighted text) of the source text is copied to the System Clipboard but the presented source text remains unchanged.

#### Paste (also included in the tool bar)

With the "Paste" function the actual content of the System Clipboard will be inserted into the presented source text directly after the actual caret position. If a text selection exists, this actual text selection is replaced by the actual System Clipboard content.

#### Select all

With the "Select all" function the complete source text is highlighted as actual selection so that it can be cut or copied.

#### Goto method

With the "Goto method" function the dialog "Locate method..." is invoked. This dialog presents via a selection field the class constructor and all "public", "private", and "protected" declared methods of the currently presented class in the sequence of their appearance in the source text. If the "Locate" button is pressed, the source text is positioned to the definition of the currently selected (highlighted) method. This function does not position the source text to the methods invocations. To achieve this, the "Find / Replace" function must be used.
Button "Quit" closes the dialog without repositioning the source text.

Note: Because Java has no unique keyword to identify a method and because a method definition can contain comments and user defined class names as return types and parameter types in some rare cases it may occure that JadeIDE does not detect a method definition. In those cases you must use the "Find / Replace" function to locate the function definition. In any case it is good practice to avoid comments in a method definition. Instead provide comments in the method's header or in a separate comment line after the method definition line.

#### Goto line (also included in the tool bar)

With the "Goto line" function you can position the source text to a certain text line. After the line number has been entered and the "Enter" button has been pressed in the "Goto line..." dialog, the source text is positioned to the desired line number. If the dialog is closed via the dialogs system menu or the exit button in the title bar no text positioning is performed.

#### Goto associated }-brace (also included in the tool bar)

Function "Goto associated }-brace" positions the source text to the end of a "{..}" block and highlights this block (light red). As start brace the first "{" brace is used following the actual caret position.

#### Goto top (also included in the tool bar)

With the "Goto top" function the presented source text is positioned to the beginning of the text.

#### Goto bottom (also included in the tool bar)

With the "Goto bottom" function the presented source text is positioned to the end of the text.

#### Find / Replace (also included in the tool bar)

With the "Find / Replace" function you can locate certain text strings in the presented source text and replace them with another string, if desired. The searched text (if existent) is highlighted (light blue background) and the source text is positioned to the line, in which the search string has been detected. A search starts at the current caret position ( the actual insertion point). Searching currently is implemented as endless search, that means, that searching is done towards the end of the text and, as soon as the end of text is reached, the search is continued from the beginning of the text. If the original starting point of the search is reached again, a message is displayed, but the search can go on.

The dialog supports the following sub-functions:

- Find all (Button "Find all"): The search starts at caret position 0 (begin of text). All search results are presented. Position of caret at the last search result.
- Find in all open files(Button "Find in open"): Complete search through all files currently opened with the JadeEditor. Start at caret position 0 (begin of file) in each file. Presentation of all search results.
- Endless single search (Button "Find next"): The search starts at the current caret position. The found text (if any) is highlighted. The caret position is changed to the position right after the located text string to allow a next search.
- Endless single replacement (Button "Replace"): The search starts at the current caret position. The found text (if any) is replaced by the replacement string and the source text is postioned to the line, the replacement took place. The caret position is changed to the position right after the replacement to allow a next replacement. If a text string is not found, a message is presented in the JadeIDE information field.
- Take back a single replacement (Button "Undo last"): The replacement performed last, will be taken back. This change back to the original value is considered a replacement too. This allows permanent switching between two values.
- Replace all existing occurences (Button "Replace all"): The search starts at caret position 0 (begin of text) and stops at the end of text. All occurances of the search string are replaced by the replace string. No confirmations are requested to make a replacement.
- Clear input fields (Button "Clear"): The input fields "Search string" and "Replace string" are cleared.
  Note: Entered "Search strings" and "Replace strings" are added to the choice fields "Available Search Strings" respectively "Available Replace String" and can be recalled from there. These values are kept for this specific edit-session and are available for all JadeEdit instances regardless of their origin.
  The input field can also be filled via a text selection in the source file. The selection is used to initialize the field "Search string".
- Button "Return" terminates the dialog without further action.

#### Set Find highlights off (also included in the tool bar)

Function "set Find highlights off" removes the highlights set to search results.

#### Indent lines

The "Indent lines" function allows to indent a number of lines by a certain number of blank characters or to truncate the lines at the beginning by a certain number of blank characters. Truncation is only performed, if no valid text gets lost. Valid text is any non blank text.

Provide the number of the first line and the last line to be indented respectively truncated at the beginning. Then provide the number of blank characters to be inserted (positive value) or the number of blank characters to be cut off (negative value). If field "make / is comment" is checked, then for an indentation the Java comment string "//" is added (indentation = number of blank chars + 2) and for a truncation the line is shortened, even if the Java comment string "//" occurs at the beginning of the line (truncation = number of chars + 2). If the field is not checked, "//" at the beginning of a line is considered to be a valid text, a truncation therefore will not happen.

#### Insert Unicode

The function "Insert Unicode" allows at any position in the source text to insert a character in Unicode representation (\uxxxx). Allowed are Unicodes in the range from 0000 to 007F. The character to be inserted is determined via the dialog "Select the desired Unicode".

The dialog allows to specify the character in two differnt ways, dependent on the type of character. Is the character to be inserted an unprintable character (Unicode 0000 to Unicode 0020 and Unicode 007f), than the selection has to be done via the choice field "unprintable Characters" (select the desired code). In this case, the field "printable Characters" must be empty, otherwise the value of this field will be taken. Are the characters to be inserted a sequence of printable characters (Unicode 0021 to Unicode 007e), than the selection has to be done via the field "printable Characters" (provide the desired character(s)). In this case, the selection in field "unpritable Characters" is not used. After pressing button "Insert", the specified character(s) will be inserted at the current caret position into the source text in Unicode representation.

#### Insert text template

The function "Insert text template" allows to insert a Jade Code Template at any position in the presented source text. The text template must be stored as a file in the "templates" sub-folder with a extension of ".jct".

The selection of the text template to be inserted is done via the "Template Selection Dialog". The dialog shows all available templates. By pressing button "Open" the selected template will be inserted into the source text at the current caret position.
Button "Cancel" terminates the dialog without any further action.

JadeIDE provides a series of predefined templates. These templates may be individually modified and own templates may be added to the folder (e.g. with the function "Save selection as template" in the Options Menu.

top of chapter to content

### The Functions of the Options Menu

Via the Options Menu of the editor some special functions are invoked. They are shown in the following picture:

#### Wrap long lines

Function "Wrap long lines" allows to wrap long text lines which cannot be shown completely in the available window width because of their length.
Note: If a compilation is performed as long as this option is set, the line numbers in potential error messages may be different from those shown in the editor.

#### Reset wrapping

Function "Reset wrapping" resets an existing line wrapping, so that long lines are again shown only partially.

#### Check pairs

Function "Check pairs" allows to test, if the strings "/*" and "*/", "(" and ")", "{" and "}", "[" and "]", as well as single quotes and double quotes only appear as pairs in the source text.
Note: As these characters may also appear in comments and literals (e.g. as "'" or '"') the result of the analysis is not always correct. If this is the case, you must use the Java Compiler/Interpreter to do the test.

#### check with JiveLint

Function "check with JiveLint" (currently only Windows) calls the Code Checker JiveLint of Sureshot (see also "http://www.bysoft.se/sureshot/javalint/index.html" ) to analyse the Java code statically.
To use the function in the Base Parameter Maintenance Dialog the Code Checker from Sureshot must be defined (Base Parameter BC_JCK). In addition the file "jconfig.txt" should exist in the "user.classpath", the directory into which JadeIDE has been installed and the file "JadeIDE.ini" is located. File "jconfig.txt" controls the exclusion of the JiveLint rules (see the relevant JiveLint documentation). In the "jconfig.txt" file delivered with JadeIDE rule 1001 and 1022 are disabled.

The result of the test is presented in the StandardOut presentation window and similar to the presentation of compilation errors you can directly jump to the source line in error, if you locate the cursor onto the desired JiveLint message line and than press the "Goto Error" button.

#### set Comment highlights on/off (also included in the tool bar)

Function "set Comment highlights on/off" switches the highlighting of comments in the source text on or off. Comments are highlighted by a light green background. If highlighting is switched on, it follows text movements (e.g. if new text is inserted or text is removed), but newly inserted comments are not directly highlighted. To highlight them, you first have to switch comment highlighting off and the on again.

#### set String highlights on/off (also included in the tool bar)

Function "set String highlights on/off" switches the highlighting of strings in the source text on or off. Strings are highlighted by a light red background. If highlighting is switched on, it follows text movements (e.g. if new text is inserted or text is removed), but newly inserted strings are not directly highlighted. To highlight them, you first have to switch string highlighting off and the on again.

#### set Keyword highlights on/off (also included in the tool bar)

Function "set Keyword highlights on/off" switches the highlighting of java keywords in the source text on or off. Keywords are highlighted by a light blue background. If highlighting is switched on, it follows text movements (e.g. if new text is inserted or text is removed), but newly inserted keywords are not directly highlighted. To highlight them, you first have to switch keyword highlighting off and the on again.

#### extract String literals

Function "extract String literals" extracts all text literals (strings started and ended by a double quote character). The java source text is not changed, but the extracted strings are appended to the source text as a string definition made to a single line comment. The programmer can than decide how to further use these definitions.

#### Save selection as template

Function "Save selection as template" allows to save the current selection in the source text as a Jade Code Template to folder "templates".

The dialog allows to provide the template name. You can specify any valid file name but it is good practice to use a menaingful name. The file extension ".jct" is added automatically by JadeIDE. After pressing the "Save" button a file is created in the "templates" folder and the selection is saved to this file. The new name is added to menu "Code Templates" so you can immediately edit the newly generated template.
If button "Cancel" is pressed, the dialog will be terminated without any further action.

#### Change Editor Font Size

Function "Change Editor Font Size" allows to change the size of the editor font. To do so, you have to enter the desired font size in points in the upcoming dialog and to press the "Select" button. Pressing the "Default" button sets the default font size (13 points). If you close the dialog (via the "X" button) without selecting a font size, the font size remains unchanged.

The specified value will be added as entry to the INI file and will be used for all further editor invocations.

top of chapter to content

#### The Functions of the Tool Bar

The tool bar is located at the left border of the editor window to provide space for as much as possible source text lines. The available line width is considered to be of less importance with regards to the amount of available rows.

The tool bar provides the following entries:

- Save
- Save all and Compile this
- Find / Replace
- Print via WebBrowser
- Undo
- Redo
- Cut
- Copy
- Paste
- Goto line
- Goto associated }-brace
- Goto top
- Goto bottom
- Set Comment highlights on/off
- Set String highlights on/off
- Set Keyword highlights on/off
- Set Find highlights off

top of chapter to content

## Installation

### Prerequisites

To run JadeIDE a JDK 1.2 or higher (e.g. from SUN Microsystems) must be installed (Currently - September 2001 - I recommend to use JDK 1.3.1). The JDK is available for free from the SUN Download Center via "http://www.sun.com/software/shop/index.html#free".
In the system there must be about 3 MB of disk space available. The required disk space for the JDK is not included!
The system should be equipped with a processor with at least 133 MHz (better 166 MHz).
As an external file editor, editors like "PFE (Programmers File Editor)" from Alan Phillips, or "Proton" from Ulli Meybohm may be installed.
The PFE can be obtained from "http://www.lancs.ac.uk/people/cpaap/pfe" or via Winsite or Simtel
and Proton can be obtained from "http://www.meybohm.de/proton/index.html"
Both products are currently freeware.
For Linux (e.g. Suse Linux 7.x) with KDE2 the "kwrite" editor can be used.
For function "Start HTML Editor" a HTML Editor should be installed. "HTML Editor Phase 5" (windows) from Ulli Meybohm and "HTML-Format" (Windows and Linux) from Christian Diekmann are excellent HTML Editors.
HTML Editior Phase 5 can be downloaded from URL "http://www.meybohm.de/htmledit/index.html"
and
HTML-Format can be downloaded from URL "http://www.downloadbereich.de/HTML-Format/HF-download.htm"
Both products are currently Freeware.
For Linux (e.g. Suse Linux 7.x and KDE2) the "kwrite" editor may be used as well.

To use the Jade editor function "check with JiveLint" you must have installed the Java Code Checker "JiveLint" from Sureshot. "JiveLint" can be downloaded from URL "http://www.bysoft.se/sureshot/javalint/index.html".

### Installation

The Jade System is provided as a ZIP file. The folder information is contained in the ZIP file. For Windows a self-extracting .exe file is also available.
Just extract the file into a directory of your choice,
[e.g. D:\jadeIDE (Windows) or /home/xxxx/jadeIDE (Unix/Linux where xxxx is your user id). Under Linux of course you can install JadeIDE also into the /opt or /usr directory.]
with a product like PKZIP, WINZIP, PowerArchiver, or WINRAR. Make sure, that the file structure is kept when expanding the archive.
The file will expand into the following file structure:
DOS/Windows form:

    D:\jadeIDE                the user.classpath => holds jconfig.txt for JiveLint and will hold jadeide.ini
      .....\help                      => jidehelp_x.htm
      ..........\images               => all ".gif" files required for Help
      .....\images                    => jade.gif, jadesmal.gif, noinput.gif
                                         jadewin.ico (Icon for shortcuts on the desktop)
      .....\templates                 => all JadeIDE provided Jade Code Templates
      .....\com
      .........\kur
      .............\ide               => all ".class" files
      .............\idedt             => directory for the test of individual windows and dialogs

Unix/Linux form (xxxx represents the user id):

    /home/xxxx/jadeIDE        the user.classpath => holds jconfig.txt for JiveLint and will hold jadeide.ini
      ...../help                      => jidehelp_x.htm
      ........../images               => all ".gif" files required for Help
      ...../images                    => jade.gif, jadesmal.gif, noinput.gif
                                         jadewin.ico (Icon for shortcuts on the desktop)
      ...../templates                 => all JadeIDE provided Jade Code Templates
      ...../com
      ........./kur
      ............./ide               => all ".class" files
      ............./idedt             => directory for the test of individual windows and dialogs

To run the JADE IDE besides the ".class" files the following files are needed in the following directories:

1. The file containing the JadeIDE parameters jadeide.ini in "user.dir" e.g. "D:\jadeIDE" or "/home/xxxx/jadeIDE"
2. The JadeIDE Logo file JADE.GIF in user.dir\images e.g. "D:\jadeIDE\images" or "/home/xxxx/jadeIDE/images"
3. The JadeIDE Icon file JADESMAL.GIF and the Cursor file NOINPUT.GIF in user.dir\images e.g. "D:\jadeIDE\images" or "/home/xxxx/jadeIDE/images"
4. The JadeIDE Help files JIDEHELP_E.HTM (or JIDEHELP_D.HTM) in user.dir\help e.g. "D:\jadeIDE\help" or "/home/xxxx/jadeIDE/help"
5. The graphics to the JadeIDE Help in user.dir\help\images e.g. "D:\jadeIDE\help\images" or "/home/xxxx/jadeIDE/help/images"

"user.dir" represents the directory, from which the program is started (in the examples "jadeIDE").

If you want to save space on your disk you can delete for the language you do not use the help file and the associated images.

Important Note: The way how JadeIDE control parameters are stored has been changed and significantly simplified compared to previous versions. They are now stored in file jadeide.ini. The old files are no longer used and can be discarded.

### Deinstallation

JadeIDE adds no entries at all to the registry of the exploited windows operating system. To completely remove JadeIDE from a windows system (as well as from a Linux system) it is sufficient, to delete the folder (with all it's sub-folders) into which the JadeIDE files have been unpacked.

### Program Invocation

The program can be invoked from a terminal or via a script/batch file e.g. like this:
DOS/Windows form of an invocation via a DOS window:
it is assumed, that the JDK is installed in C:\JDK1.3

    C:\>d:
    D:\>cd jadeIDE
    D:\jadeIDE>C:\JDK1.3\bin\java.exe -classpath D:\jadeIDE; com.kur.ide.Control LANG=parm

Unix/Linux form of an invocation via a Terminal ( xxxx represents the user id ):
it is assumed, that the JDK is installed in /usr/java/jdk1.3.1

    xxxx@linux:~ >
    xxxx@linux:~ > cd jadeIDE
    xxxx@linux:~ /jadeIDE > /usr/java/jdk1.3.1/bin/java -classpath /home/xxxx/jadeIDE com.kur.ide.Control  LANG=parm

Make sure that line 3 of the invocation (the text after the ">" character) is presented to the "command interpreter" of the OS as a single line!

In this example user.dir is "D:\jadeIDE" or "/home/xxxx/jadeIDE",
parm defines the language used for JadeIDE execution. Currently supported is "E" for English and "D" for German (Deutsch).
e.g. LANG=E

Very important Note: Please consider, that you have to set the parameters required by JadeIDE at the first invocation of the product. The first action therefore is to invoke the setup dialogs (with their associated sub dialogs) via menu "File -> Maintain Basic Parameters" and "File -> Define/Update Projects" !
For more information go to: The "Setup" Dialogs for the JadeIDE Parameter Definition.

top of chapter
to content