----------------------------------------------------------------------- README Java2Rose 1.1 ----------------------------------------------------------------------- '98, 3/21 Kenji Hiranabe, Toshihiro Okamura $Revision: 1.3 $ $Date: 1999/02/16 02:45:18 $ ======== OVERVIEW ======== Thank you for downloading Java2Rose 1.1. Java2Rose is a documentation generator(Doclet) which utilizes javadoc to convert java source files to a '.red' file importable into Rational Rose(TM). This docement contains license, functionalities, requirements, installation infomation and so on of this tool. We provide two versions in the same zip file corresponding to JDK1.1 and JDK1.2 each other. The JDK1.1 version of this tool uses "-doctype" javadoc (hidden) option to customize the output of javadoc. The JDK1.2 version uses "Doclet" to do the same thing more neatly. ======== LICENESE ======== This is FREE SOFTWARE provided "AS IS", with NO WARRANTY. ================ FUNCTIONALITIES ================ By using Java2Rose, you can easily generate a file to update the Rose's model. This tool gets the following information from the java source files. o class properties: name, super class, abstractness, and javadoc comments, etc. o data member properties: name, type/class, staticness, accessibility, and javadoc comments, etc. o method properties: name, type/class of the return value, staticness, accessibilities, type of the arguments”¤name of the arguments, javadoc comments. ======== WARNING ======== Please make a backup before you update the .mdl file. =========== REQUIREMENTS =========== A product of Rational Rose(TM) family(such as Rose/C++, Rose/Java) and JDK.1.1.X/JDK.1.2.X are needed to use this tool. The produced red file is of petal version 37. ============= INSTALLATION ============= ** JDK1.1 version ** 0. Unzip the downloaded file. 1. Copy recursively the 'sun' folder to an appropreate folder. In this document, the tool is assumed to copied into C:\java2rose folder. The folder will look like; C:\java2rose\sun\tools\javadoc\RedDocumentation.class 2. Set the CLASSPATH environment. Add the folder to the first member of the CLASSPATH environment variable. Example: set CLASSPATH = C:\java2rose;.;C:\jdk1.1\lib\classes.zip In Windows NT, follow [Control Panel] -> [System] -> [Environment] 3. Set the PATH environment. Add the path to 'javadoc' to the PATH environment variable. Example: set PATH = C:\jdk1.1\bin;%PATH% See the javadoc documentation, and make sure that javadoc works correctly. 4. Verify the javadoc installation. From the DOS prompt, type javadoc to see javadoc is working. Then, go on to the USAGE below. ** JDK1.2(Doclet) version ** 0. Unzip the downloaded file. 1. Copy recursively the 'JP' folder to an appropreate folder. In this document, the tool is assumed to be copied into C:\java2rose folder. The folder will look like; C:\java2rose\JP\co\esm\caddies\doclets\RedDoclet.class 2. Set the CLASSPATH environment. Add the folder to the CLASSPATH environment variable. Example: set CLASSPATH = C:\java2rose;.;C:\jdk1.2\lib\tools.jar In Windows NT, follow [Control Panel] -> [System] -> [Environment] 3. Set the PATH environment. Add the path to 'javadoc' to the PATH environment variable. Example: set PATH = C:\jdk1.2\bin;%PATH% See the javadoc documentation, and make sure that javadoc works correctly. 4. Verify the javadoc installation. From the DOS prompt, type javadoc to see javadoc is working. Then, go on to the USAGE below. ====== USAGE ====== 1. Make a red file The command syntax is the same as javadoc. In JDK1.1 version; C:\> javadoc -doctype Red -private [...] C:\> javadoc -doctype Red -private In JDK1.2 version; C:\> javadoc -doclet JP.co.esm.caddies.doclets.RedDoclet -private [...] C:\> javadoc -doclet JP.co.esm.caddies.doclets.RedDoclet -private The first form in each version creates a red update file for the specified classes. file1.red,... will be created in the current folder. The second form creates a red file for all classes in the package in one file(package-name.red). If you want to specify the folder to output, use -d javadoc option. If you got stuck, omit "-doctype/-doclet" option and make sure the original javadoc works. If it's OK, use -verbose option to see the classes are correctly read. 2. Prepare a Rose file. Case1: If you already have a rose model to update; [Warning] The class specifications will be OVERWRITTEN. (0) Open the model file. (1) Check the category names. The category names should be separated by '.' as the java package name convention. Example: The classes in the 'foo.boo' java package should be in the 'foo.boo' rose category. Case2: If you are creating a new rose model; (0) New a model file. (1) make categories for the classes to read in. The category names should be separated by '.' as the java package name convention. Example: The classes in the 'foo.boo' java package should be in the 'foo.boo' rose category. 3. Save the model file for safty. 4. Update the model file with the red file. [File]->[Update] and specify the created red file. The model file should be updated. 5”„Add classes to the diagram(if not seen in the diagram). Open the category and [Query]->[Add Classes] to view the newly added classes. 6. Layout the class icons as you like. [Others] 1. This tool utilizes javadoc. If you have a problem, first make sure javadoc works correctly. 2. A batch file may simplify your work. for JDK1.1 --------- java2rose.bat -------------------------------------- @ECHO OFF javadoc -private -notree -noindex -doctype Red %1 %2 %3 %4 %5 -------------------------------------------------------------- for JDK1.2 --------- java2rose.bat -------------------------------------- @ECHO OFF javadoc -private -doclet JP.co.esm.caddies.doclets.RedDoclet %1 %2 %3 %4 %5 -------------------------------------------------------------- 3. The source code of this tool includes 'Japanese' comments in it. Your editor may not see/edit the code. 4. This tool may be upgrated and other related tools may be announced at; http://www.esm.co.jp/divisions/open-sys/technic.htm Hope you stay tuned. 5. Bug report, Comments are welcome. mailto:hiranabe at esm.co.jp,okamura at esm.co.jp Thanks. --- Eiwa System Management, Inc. http://www.esm.co.jp/ Kenji Hiranabe E-Mail: hiranabe at esm.co.jp Toshihiro Okamura E-Mail: okamura at esm.co.jp