Table of Contents
Kelp provides wizards and tools that help you develop Enhydra applications from within your IDE.
The Kelp Application Wizard, shown in Figure 1, speeds up project development by generating the framework and source files for new applications and components. The Kelp Application Wizard uses two generators to create Enhydra projects: the Web Application generator and the Enhydra Application generator.
The Application Wizard uses the following generators:
Web application (Servlet 2.2 compatible)
Enhydra application (super-servlet style application)
Creating a new project:
To use the Kelp Application Wizard from within the IDE, create a Enhydra project beforehand, and Wizard is automaticaly invoked.
Generate Enhydra project with Kelp Application Wizard in Eclipse:
1. Open "File->New->Project..."
2. Select "Enhydra" in left, and "Enhydra Project" in right frame. Click "Next".
3. Enter project name. Click "Next" (NOTE: if you do not use default directory, directory must end with project name).
4. Click "Finish"(IMPORTANT: Do not change project properties (required libraries, source folders, etc.) setuped for Enhydra specific properties), Kelp AppWizard appear.
5. Choose "Component type" and click "Next".
6. Choose "Client Type" and click "Next". (IMPORTANT: Fields "Project directory name" and "Project root" are set from previous steps and should not be changed)
7. Click "Next" (IMPORTANT: Leave "Generate start sripts and command line build file" checked. Kelp needs build.xml file for holding project properties).
When you have finished setting the options you want, click Finish to generate your application files. When generation is complete, view the newly generated Readme.html file that has been added to your project. Readme.html shows the steps you need to build and run the application or service. The steps will vary, depending on which IDE you are using.
![]() |
Figure 1: Kelp Application Wizard, launched from Eclipse
For more information on the Kelp Application Wizard, see Chapter 2, "Using the Kelp Application Wizard," of the Developer's Guide. Once you create a project, you can use the Kelp XMLC tool and the Kelp Deployer tool to work with it.
In both the Kelp XMLC tool and Enhydra Deployment wizards, you use a tabbed dialog box to select files, set options, and view the build process.
Table of Contents
The XML Compiler dialog calls XMLC, which compiles HTML and XML files into DOM classes. To open the dialog in Eclipse IDE, select Enhydra Tools-->XML Compiler (if Enhydra Tools is not visible in main manu, open "Window->Customize Perspective...", expand "Other" and check "Enhydra Tools"). The tools are available only when a project is selected.
The dialog box has three primary tabs: Selections, Options, and Output. The Selections tab, shown in Figure 2, displays all files in the currently selected project that are recognized as compilable by XMLC. You can use the single arrow buttons (< and >) to add or remove files from the list selected to be compiled. Use the double arrow buttons (< < and > >) to add or remove all files from the selection list. Select the Show Full File Path check box to display the full path of the files.
![]() |
Figure 2: Selections tab of the XML Compiler dialog
The Options tab displays following options:
Enable/disable invoking XMLC during project Ant rebuild.
NOTE for Eclipse IDE:
To run Ant rebuild task, select "Enhydra Tools"-->"Ant Rebuild" (to view log open "Window"-->"Show View"-->"Log Console").
If you want to invoke XMLC during Eclipse IDE Rebuild, use following steps:
1. Right click on project name, choose "Properties".
2. Select "External Tools Builder"-->"ant xmlc".
3. Click on "Edit" button.
4. Select check box "Run on: Full Build", click "OK".
Enable/disable verbose output.
Package name mappings. Changing mappings will affect only currently selected documents. (Recommended is to use default)
XMLC options file, allow user to edit xmlc parameters for selected options file.
![]() |
Figure 3: Options tab of the Kelp XMLC tool
The Output tab shows the results of running XMLC ant task based on the files you selected on the Selections tab. For information on the Output tab, see "Setting output options" .
The Output tab (Figure 4) is automatically selected when you click Compile in the XML Compiler dialog. This tab contains a scrollable text area that displays the results of the compile. If you have any errors in your HTML files, the problems appear on this tab. You can optionally save the output to a text file by selecting Output To Log File and entering a file name.
![]() |
Figure 4: Output tab of the XML Compiler dialog
The Output page displays the files that are created during the compilation process. XMLC Ant task will compile only documents changed after last compilation. If an HTML file contains a new error, the associated Java files are not regenerated.
Table of Contents
The Kelp Deployer lets you quickly configure projects for your current environment and directory structure. The Kelp Deployer helps you perform the following four tasks:
Generate configuration files and deployment descriptors from input templates
Copy static content to your document root
Create a deployable archive, based on the type of application or component
Set up your project so you can launch Enhydra with your application
This tab sets and displays basic information about deployment.
![]() |
Figure 5: General tab of the Deployer dialog
Deploy Type--Shows the component type("Web Application"/"Enhydra Super-servlet") to deploy.
Destination directory--Allows user to chose output folder.
Enable/disable invoking deployer during project Ant rebuild.
NOTE for Eclipse IDE:
To run Ant rebuild task, select "Enhydra Tools"-->"Ant Rebuild".
If you want to invoke Deployer during Eclipse IDE Rebuild, use following steps:
1. Right click on project name, choose "Properties".
2. Select "External Tools Builder"-->"ant deploy".
3. Click on "Edit" button.
4. Select check box "Run on: Full Build", click "OK".
Template Path points to the location of your project's .in files, which are template files. These files are processed and copied to your Deploy Root folder using relative paths.
![]() |
Figure 6: Input|Documents tab of the Deployer dialog
Documents--The Documents tab shows all template files in project input folder, which will be processed.
Select Show Full File Path to show the full path of each template file.
It is not recommended to change input folder, becouse AppWizard is generate default input templates.
![]() |
Figure 7: Input|Replacements tab of the Deployer dialog
Replacements--The Replacements tab lets you adjust the template settings for your project. Templates have the extension .in. Templates are text files with placeholders that are replaced with system-specific information by the Kelp Deployer (e.g. run.bat is created from run.bat.in and is used for running application inside Multiserver from console).
You can customize the search and replace mechanism by editing the data in the Replace Text table on the Options tab of the dialog. The default option lets you quickly restore the default project settings. Replacements will affect only files with ".in" extension (e.g in Figure 7 row "DEPLOY_PATH"|"${output.dir}" will replace token "@DEPLOY_PATH@" with value of Deploy destination directory in General tab).
You can change the order for replacements using the Move Up and Move Down buttons. Items at the top are replaced first. The Reset button sets the Replace With text back to the default values.
Show Full File Path--Displays the full path for files
Enable Input Deployment--Enables or disables input deployment. If you are using deployer for the first time, input deployment should be enabled.
Paths--The Kelp deployer will copy content types files from the content source directory (resource folder) to the content destination directory (depends on application type).
![]() |
Figure 8: Content|Paths tab of the Deployer dialog
Types--The Content Types subtab shows the extensions of static resource files that will be copied from the Content Source directory to your document root directory. Click Add to enter a new extension. Select an extension and click Remove to keep files with that extension from being copied. Click Reset to go to the default values of recognized extensions.
![]() |
Figure 9: Content|Types tab of the Deployer dialog
Also, archive will be created and placed in output/lib directory ("war" for Web Application, "jar" for Enhydra Super-servlet application).
To start dods ant based build procedure in project, start "Enhydra Tools"-->"DODS Generator" on menu.
![]() |
Figure 10: DODS Generator Wizard
You can start dods in Dods Generate window with one of the following parameters:
Output dir -- where to place generated files
Doml file -- path to doml file
Papers -- choose document type to generate
Extensions -- choose extensions
SQL generate -- generate sql script files
Java generate -- generate Java files
Button Cancel -- quit wizard without saving changes
Button Generate -- save changes and run DODS Generator
Button Close -- save changes without running DODS Generator.
If "Invoke DODS Generator during project Ant Rebuild" is selected, Generator will be run when Ant rebuild task is started.
NOTE:
If you want to invoke Deployer during Eclipse IDE Rebuild, use following steps:
1. Right click on project name, choose "Properties".
2. Select "External Tools Builder"-->"ant dods".
3. Click on "Edit" button.
4. Select check box "Run on: Full Build", click "OK".
Sql and java files will be generated into current project source directory.