Michael,

Theres a couple of ways around this problem:

**********
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.
**********

Please let me know if you have other questions.

Regards

Vishu





[EMAIL PROTECTED] wrote:

> > I would like to reverse engineer some Java classes with instance variables
> > of datatype String. When I do this, Rose generates an association, not a
> > field. If I manually enter fields into a Rose class model, I can set the
> > datatype to String or any other Java class. Can I reverse engineer Java
> > and have Rose create class model fields with a String datatype?
> >
> > P.S.  If I  generate Java code from a Rose class definition definition
> > containing String fields, and then reverse engineer the java source back
> > into Rose, I get an association and the field disappears.
> >
> P.P.S. I am using Rose 98 Enterprise Edition
> ************************************************************************
> * 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
> *************************************************************************

--
---
Annamalai "Vishu" Viswanathan  --  [EMAIL PROTECTED]
Rose Technical Support Engineer
Rational WW Customer Service

We value your feedback and encourage you to respond to the Rational
Customer Service survey you may receive regarding this case.

---


Attachment: assocToAttsJava.ebs
Description: application/unknown-content-type-rose.script

Reply via email to