Pramati Technologies

Adding Custom Tools

Studio provides a way of adding custom tools to the framework. Tools may be added to the framework as "tool archives".

To import a tool, use the Import Tool button. The class ToolJarReader in com.pramati.studio.config creates the tool configuration information objects given a JAR. The JAR should have a manifest file with all the required entries. Studio registers all the features of the tool immediately and does not need to be restarted when a new tool is added.

The manifest file in the JAR should follow the format given below:

Field
Description
Manifest Version: 1.0
This field is mandatory.
Name: Name of the Tool
Placing the name of the tool here makes it unique in context of the JAR.
Pramati-Studio-Tool: true
Specifies that the entry points to a Pramati-Studio-Tool. The entries can be retained without having Studio pick up tools by setting the value to false.
Tool- Class-Path: templates.jar classes.jar
Set the Classpath for the tool here. The original JAR is always in the class path. Classpaths can be relative or absolute. If relative, then an absolute path is constructed using the parent directory of the original JAR. The classpath can be left blank.
Tool-Main-Class: class name
Enter the tool's main class. Once the user has set the main class here, it is not required to remember the class after this.
Error-Message: message
Enter the error message to be printed when there is an error. The error message can be left blank.
Description: description
Enter the description of the tool here. The description can be left blank.

To add the manifest files to an existing JAR, use the command

jar ufm <jar-file-name> <manifest-content-text-file>

where <manifest-content-text-file> is a simple text file comprising all the required contents in MANIFEST.MF, the manifest file.

Once the manifest file is ready, clicking on Import Tool prompts the user for the JAR to be imported. After the JAR is imported into Studio, the tool can be deployed and undeployed.

Example:

To understand the format of the manifest file more clearly, read the sample manifest file. The tool main class ManifestWizard used in the example is a dummy tool.

Name: ManifestWizard

Pramati-Studio-Tool: true

Tool-Class-Path:

Tool-Main-Class: com.pramati.studio.tools.manifestwizard.ManifestPropertiesPanel

Description: Dummy tool for importing in Pramati Studio

Error-Message:


Pramati Technologies  © Copyright   TOCPREVNEXTINDEX