Hi Matt, ********** 1. I have attached a script to this e-mail. After you reverse engineer your code you can modify and run this script. This will convert jdk class types variables from associations to attributes. The script in its current form accounts for the String and Vector class types, i.e all attributes of any of these types will be modeled as attributes and not as associations. If you have other jdk class types that you would like to add to this list then you need to modify this script. Lets say that I want to add two new class types to this list and that those two types are called JavaType1 and JavaType2...this is what I need to do..
Go to the section of the script listed below Dim theTypes(1) As String theTypes(0) = "String" theTypes(1) = "Vector" types = 2 and modify it to read as follows Dim theTypes(3) As String theTypes(0) = "String" theTypes(1) = "Vector" theTypes(2) = "JavaType1" theTypes(3) = "JavaType2" types = 4 Now the script will account for these two variable types as well. The down side to using this script is that you have to run this script everytime you reverse engineer any code. ********** ********** 2. If you are looking for a more permanent solution then you can simply add the java class types to the Fundamental Types in the registry. This is what you need to do: - Shut down Rose (if it is running). - Go to the following registry entry: [HKEY_LOCAL_MACHINE\Software\Rational Software\Rose\AddIns\Java] There is a 'Fundamental Types' there that lists all of the primitive types such as bool, int, double etc. You can add the java class types to this list. For instance if you added String to the list of primitive types this is what the 'Fundamental Types' might look like: [HKEY_LOCAL_MACHINE\Software\Rational Software\Rose\AddIns\Java] "FundamentalTypes"="boolean; char; byte; short; int; long; float;double; String" Or if you prefer you could simply update the registry by double clicking a .reg file that you create. The contents of this .reg file might be something like this: --- REGEDIT4 [HKEY_LOCAL_MACHINE\Software\Rational Software\Rose\AddIns\Java] "FundamentalTypes"="boolean; char; byte; short; int; long; float; double; String" --- This fix means that no script will need to be run after you reverse engineer code. The java types are added to the list of primitive types and Rose treats them as such. Note also that the later versions of Rose allow you to set fundamental types from the GUI itself. For instanced in Rose 2002 if you do a Tools->Java/J2EE->Project Specification and look under the Code Generation tab you will see that you can add many of the more common jdk class types to the list of fundamental with a click of a button. ********** Regards Vishu ********** Annamalai "Vishu" Viswanathan -- [EMAIL PROTECTED] Rose Technical Support Engineer Rational Customer Service - Committed to Service Excellence SCP Certified: http://www.rational.com/support/scp.jsp Rational User Conference 2002.....Freedom to Create! Call for Papers Now Open at http://www.rational.com/ruc August 18-22, 2002 Lake Buena Vista, Florida ********** -----Original Message----- From: Manley, Matt [mailto:[EMAIL PROTECTED]] Sent: Friday, April 26, 2002 9:54 AM To: '[EMAIL PROTECTED]' Subject: (ROSE) Reverse Engineering & Java Fundamental Types I am trying to reverse-engineer some java classes that have attributes like HashMap & ArrayList, but am not getting this listed as attributes. They are being setup as Associations. I've placed the rt.jar in the classpath, using JDK1.3, (Rational Solution ID #13860). Both java.util.ArrayList & java.util.HashMap are listed in the "Fundamental Types" under Project Specification for Java Reverse Engineering, (First two entries past the primitives), and I still cannot get this to be reverse engineered as attributes................ Is there something else I should be doing? Below is a sample .java file that I'm using. public class TestObj { private static final String s1 = "One"; private static final String s2 = "Two"; private static final String s3 = "Three"; private HashMap theMap; private ArrayList theList; public TestObj() { } } Eric Manley ************************************************************************ * Rose Forum is a public venue for ideas and discussions. * For technical support, visit http://www.rational.com/support * * Post or Reply to: [EMAIL PROTECTED] * Subscription Requests: [EMAIL PROTECTED] * Archive of messages: * http://www.rational.com/support/usergroups/rose/rose_forum.jsp * Other Requests: [EMAIL PROTECTED] * * To unsubscribe from the list, please send email * To: [EMAIL PROTECTED] * Subject: <BLANK> * Body: unsubscribe rose_forum *************************************************************************
assocToAttsJava.ebs
Description: Binary data
