Exporting the Sources for Files and Directories to HTML in Pramati Studio 3.5

Topics

Configuring Export to HTML in Studio
Using the Export to HTML option
Changing the appearance of exported HTMLs by editing CSS or modifying IDE Options
Examples

Introduction

The Export to HTML tool is a plugin to Pramati Studio. It enables you to export sources in a directory or a single source file into chroma-coded HTMLs. The look and feel of the HTML output is based on the various style sheets such as java.css for Java file and jsp.css for a JSP. Download the executable from Pramati website and follow the instructions given in this document.

Configuring Export to HTML in Studio

To configure Export to HTML in Studio:
  1. Select Tools > Configure from the main menu.
  2. In the Configure panel, click Import Tool
  3. In the File Chooser, browse and select the downloaded JAR.

  4. Note: Before closing the panel, you can see that the Export as HTML option appears in the Available Tools list.
The Export to HTML option appears in the File Menu.

Using the Export to HTML option

The Export to HTML option can be used to export an entire directory or a single file.

Exporting a directory to HTML

  1. Open a desk in Studio.
  2. From the menu bar, select File > Export to HTML.
  3. Enter the location for storing the .html files for the directory and click Export.

Exporting a file to HTML

  1. Open a file in the Editor and select File > Export to HTML from the main menu.
  2. In the dialog, enter the location for storing the .html file and click Export.
To verify, open the output directory in a browser. There are two folders in the output directory, one for CSS and one for the .html file. The generated HTMLs use style sheets stored in this location.

Changing the appearance of exported HTMLs by editing CSS or modifying IDE Options

The appearance of the HTML can be modified in the following ways:

Examples

Open the EJB 2.0 sample application, OrderBook and follow these steps:
  1. Follow the intstructions in the section Configuring Export to HTML in Studio to install the plugin.
  2. Open OrderSession.java in the Editor.
  3. Select File > Export to HTML from the main menu.
  4. Modify the default location to <install_dir>\test
  5. In the browser, open <install_dir>\test\tohtml. There are two folders, css and OrderBook.
  6. Browse to the file OrderSession.java.html which is located in OrderBook\orderApp\com\pramati\sample\orderApp
View the source in an editor. the import statements from the Java file
import java.rmi.RemoteException;
import java.util.*;
import javax.ejb.*;
import com.pramati.sample.orderApp.dvo.*;
are coded in HTML as:
 
	
<span class="keyword1">package</span> com.pramati.sample.orderApp;

/* **********************************************
* Generated by Pramati Technologies, EJBWizard
* RemoteInterface Class of the OrderSessionBean *
* Thu May 17 23:45:02 GMT+05:30 2001
* ***********************************************/

<span class="keyword1">import</span> java.rmi.RemoteException;
<span class="keyword1">import</span> java.util.*;
<span class="keyword1">import</span> javax.ejb.*;

<span class="keyword1">import</span> com.pramati.sample.orderApp.dvo.*;   
To modify the appearance using the CSS:
  1. Open java.css in a editor.
  2. Change the color code for method to rgb(101,0,153).
  3. Reload the view for OrderSession.java.html in the browser.
All occurences of methods appear purple instead of the default color, black. To modify the appearance using IDE options:
  1. Select File > IDE Options from the Studio main menu.
  2. In the IDE Options panel, select Java > Blank Lines.
  3. Select the options "throws" on new line and click Apply.
  4. Delete the existing CSS file from the location <install_dir>\test\tohtml
  5. In Studio, select File > Export to HTML.
  6. To verify, open the .html file in a browser.
Before setting these values, the code block appeared as:
public java.util.Properties getAllCustomers( ) throws java.rmi.RemoteException , javax.ejb.FinderException;
public void createSalesOrder( java.lang.String salesOrderId , java.lang.String customerID , java.util.Collection lineItems ) throws javax.ejb.CreateException , java.rmi.RemoteException;

After setting the conditions as mentioned, the code block appears as:
public java.util.Properties getAllCustomers( )
         throws java.rmi.RemoteException , javax.ejb.FinderException;
    public void createSalesOrder( java.lang.String salesOrderId , java.lang.String customerID , java.util.Collection lineItems ) 
         throws javax.ejb.CreateException , java.rmi.RemoteException;

Download the tool now


© Copyright 2003 Pramati Technologies