Topic
  • 16 replies
  • Latest Post - ‏2006-09-03T12:53:16Z by SystemAdmin
SystemAdmin
SystemAdmin
14225 Posts

Pinned topic Reverse Engineer Using RSA

‏2005-05-25T02:54:01Z |
Im trying to use Rational Software Architect (RSA) to convert my java code into a UML model.

All I seem to be able to do through RSA is using the Visualize menu visualize my source Java file as a class diagram into a model project. But my source class is saved in my UML model as a diagram with a class on it.

I want my class to be transferred to my UML model where I can see it in my model explorer and expand it to see its attributes and operations.

Is there a way to convert my java source classes into UML model classes using RSA.

Any help will be appreciated.

Thanks

Nat
Updated on 2006-09-03T12:53:16Z at 2006-09-03T12:53:16Z by SystemAdmin
  • kimletkeman
    kimletkeman
    55 Posts

    Re: Reverse Engineer Using RSA

    ‏2005-05-25T20:00:10Z  
    Once you have visualized some classes on a diagram, select the classes on the diagram and the context menu should offer "harvest".

    This command will copy the java classes as harvested UML classes to the clipboard. Then you can simply paste the classes onto a diagram (even the same one) and you'll see the UML classes added to your model. The multiple steps is a little inconvenient, but it should do much of what you want.
  • SystemAdmin
    SystemAdmin
    14225 Posts

    Re: Reverse Engineer Using RSA

    ‏2005-05-26T16:25:38Z  
    One question I wold have is what do you intend to do with this model?

    If you are just trying to get a UML rendition of your Java classes, I would suggest you use the visualisation technology that is built into the tool. This ensure complete and continuous synchronisation of your UML diagrams and your code since "the code is the master". In such a scenario, you would not need a model explorer as the package explorer (for example) would serve that function.

    If you are trying to re-engineer an application, then the solution proposed by Kim in a separate response is adequate, in conjunction with visualisation! Note that using Kim's approach, you will be losing some information, but that would be acceptable in a re-engineering situation where you would want to change the part of your system you are "harvesting". These harvested classes can then be modified to your new architecture, and linked to visualised classes, to generate your "next generation" application.

    As indicated by Danny Sabah, IBM Rational's new general manager, in the Rational Software Development Conference's keynote, one goal is for our tools to allow you, our users, to raise the level of abstraction at which you work.
  • SystemAdmin
    SystemAdmin
    14225 Posts

    Re: Reverse Engineer Using RSA

    ‏2005-06-09T18:13:34Z  
    One question I wold have is what do you intend to do with this model?

    If you are just trying to get a UML rendition of your Java classes, I would suggest you use the visualisation technology that is built into the tool. This ensure complete and continuous synchronisation of your UML diagrams and your code since "the code is the master". In such a scenario, you would not need a model explorer as the package explorer (for example) would serve that function.

    If you are trying to re-engineer an application, then the solution proposed by Kim in a separate response is adequate, in conjunction with visualisation! Note that using Kim's approach, you will be losing some information, but that would be acceptable in a re-engineering situation where you would want to change the part of your system you are "harvesting". These harvested classes can then be modified to your new architecture, and linked to visualised classes, to generate your "next generation" application.

    As indicated by Danny Sabah, IBM Rational's new general manager, in the Rational Software Development Conference's keynote, one goal is for our tools to allow you, our users, to raise the level of abstraction at which you work.
    What do you mean by "use the visualization technology that is built into the tool"? Can you please elaborate?

    All I want to do is represent the existing code in Static Class diagrams by reverse engineering. Then I would enhance the design for new functionality. I presume that is basic requirement for any UML tools and even modeling tools costing $29.95 support it. Are you saying that your manager (and your tool) doesnt support this feature? I am pretty disappointed (in fact outraged) that there is no reverse engineering in RSA after paying big bucks.

    I still do not understand the two clumsy workarounds offered. Could you please explain a little more on how I can visualize my existing java code as a model and how changes in between the model and code are synchronized? I am using that functionality in Together J since five years. I had to buy RSA for RequistiePro integration. Now I am lost. Please help.
    Thanks,
    PVRK
  • kimletkeman
    kimletkeman
    55 Posts

    Re: Reverse Engineer Using RSA

    ‏2005-06-10T03:43:17Z  
    What do you mean by "use the visualization technology that is built into the tool"? Can you please elaborate?

    All I want to do is represent the existing code in Static Class diagrams by reverse engineering. Then I would enhance the design for new functionality. I presume that is basic requirement for any UML tools and even modeling tools costing $29.95 support it. Are you saying that your manager (and your tool) doesnt support this feature? I am pretty disappointed (in fact outraged) that there is no reverse engineering in RSA after paying big bucks.

    I still do not understand the two clumsy workarounds offered. Could you please explain a little more on how I can visualize my existing java code as a model and how changes in between the model and code are synchronized? I am using that functionality in Together J since five years. I had to buy RSA for RequistiePro integration. Now I am lost. Please help.
    Thanks,
    PVRK
    Have you tried creating a model (say, vizualize.emx) and adding a class diagram, onto which you drag the classes you want to work with? That will give you a nice representation of your static class relationships that reacts in real time to changes to your java files.

    Was this use case what you were driving at?
  • SystemAdmin
    SystemAdmin
    14225 Posts

    Re:Re: Reverse Engineer Using RSA

    ‏2005-06-10T03:55:05Z  
    What do you mean by "use the visualization technology that is built into the tool"? Can you please elaborate?

    All I want to do is represent the existing code in Static Class diagrams by reverse engineering. Then I would enhance the design for new functionality. I presume that is basic requirement for any UML tools and even modeling tools costing $29.95 support it. Are you saying that your manager (and your tool) doesnt support this feature? I am pretty disappointed (in fact outraged) that there is no reverse engineering in RSA after paying big bucks.

    I still do not understand the two clumsy workarounds offered. Could you please explain a little more on how I can visualize my existing java code as a model and how changes in between the model and code are synchronized? I am using that functionality in Together J since five years. I had to buy RSA for RequistiePro integration. Now I am lost. Please help.
    Thanks,
    PVRK
    Visualization in RSA is akin to Reverse Engineering in the sense that it
    helps you to represent your code visually. However vizualized elements are
    not UML elements. This differentiation because Modeling artifacts are at a
    layer higher than the code. However visualized elements are nothing else
    but the code.

    You can represent both viz and UML elements on the same class diagrams.
    You just need to drag and drop the java files on to your model and RSA
    will automatically visualize them for you.
    Any changes you now make to code or viz elements will be automatically
    sync'ed.

    Thanks,
    • Mukesh

    owner-dev-tools@lists.us.ibm.com wrote on 06/09/2005 11:43:34 PM:

    > What do you mean by "use the visualization technology that is built
    > into the tool"? Can you please elaborate?
    >
    > All I want to do is represent the existing code in Static Class
    > diagrams by reverse engineering. Then I would enhance the design for
    > new functionality. I presume that is basic requirement for any UML
    > tools and even modeling tools costing $29.95 support it. Are you
    > saying that your manager (and your tool) doesn?t support this
    > feature? I am pretty disappointed (in fact outraged) that there is
    > no reverse engineering in RSA after paying big bucks.
    >
    > I still do not understand the two clumsy workarounds offered. Could
    > you please explain a little more on how I can visualize my existing
    > java code as a model and how changes in between the model and code
    > are synchronized? I am using that functionality in Together J since
    > five years. I had to buy RSA for RequistiePro integration. Now I am
    > lost. Please help.
    > Thanks,
    > PVRK
    >
    > <============================================================
    > To unsubscribe, send email to
    > majordomo@lists.us.ibm.com and put these words in the
    > message body: unsubscribe dev-tools
    > ============================================================>

    <============================================================
    To unsubscribe, send email to
    majordomo@lists.us.ibm.com and put these words in the
    message body: unsubscribe dev-tools
    ============================================================>
  • SystemAdmin
    SystemAdmin
    14225 Posts

    Re: Reverse Engineer Using RSA

    ‏2005-06-20T23:37:02Z  
    Have you tried creating a model (say, vizualize.emx) and adding a class diagram, onto which you drag the classes you want to work with? That will give you a nice representation of your static class relationships that reacts in real time to changes to your java files.

    Was this use case what you were driving at?
    The static representation of the class has little to do with reverse engineering. The drag and drop feature is nice, but why when I right click on the class and select properties, when viewing class diagram (model perspective), I do not get any class properties to edit? Why this imported class is any different from UML classes created using model perspective?
  • kimletkeman
    kimletkeman
    55 Posts

    Re: Reverse Engineer Using RSA

    ‏2005-06-21T01:02:32Z  
    The static representation of the class has little to do with reverse engineering. The drag and drop feature is nice, but why when I right click on the class and select properties, when viewing class diagram (model perspective), I do not get any class properties to edit? Why this imported class is any different from UML classes created using model perspective?
    A java class on a model diagram isn't really imported per se. It is actually visualized. That is, you are viewing a notational window onto the java class. The properties you see are the notational properties of the view.

    There are no UML properties because this is not a UML element, but rather a notational element referencing a java class.

    You can convert the java class view to a UML class element using a harvest operation -- right click the class view and select "harvest". Then right click the diagram surface and select "edit", then "paste".

    A UML class essentially identical to your java class will appear on the diagram. You can then edit the properties on that verison of the class.
  • SystemAdmin
    SystemAdmin
    14225 Posts

    Re: Reverse Engineer Using RSA

    ‏2005-06-22T21:14:15Z  
    I had issues imporing Java code in RSA. Unlike, Rational Rose, the comments I have on my Java code were not imported.

    Regarding "real" classes and "java classes", you can also create a model and move your UML "java classes" to your UML model. This would provide the same features of the harvest option commented in this forum.

    However, we had still some issues. I can easly add new fields and methods in a UML "Java Class", but we cannot modify such fields in the class diagram: it seems that such a change has to be done in the code. It is kind of frustating to have different behaviors in a "real" UML class diagram and in a UML "Java Class" diagram

    celio
  • SystemAdmin
    SystemAdmin
    14225 Posts

    Re: Reverse Engineer Using RSA

    ‏2006-06-23T17:26:07Z  

    Yes. But it's not really "Reverse Engineering". It's something about choosing the check box, "replace UML object" in representing code in a UML diagram, which is explained in a dWorks Tutorial or article released or re-announced in the last few months.

    Obviously, I can't remember the title or I would post a link here. I tried the feature when I was reading about it and it works as described, so that's the good news.

    I will try again to find it for you. Meanwhile, hopefully this will remind someone with a better memory than me, and they will post a link to the article/tutorial.

    Good luck; "The Truth is Out There."

    Jim

    When settling down in front of a computer to do something useful,
    Never say, or even think,
    "I will just do this quickly."
  • SystemAdmin
    SystemAdmin
    14225 Posts

    Yes. But it's not really "Reverse Engineering".

    ‏2006-06-23T17:26:39Z  

    Yes. But it's not really "Reverse Engineering". It's something about choosing the check box, "replace UML object" in representing code in a UML diagram, which is explained in a dWorks Tutorial or article released or re-announced in the last few months.

    Obviously, I can't remember the title or I would post a link here. I tried the feature when I was reading about it and it works as described, so that's the good news.

    I will try again to find it for you. Meanwhile, hopefully this will remind someone with a better memory than me, and they will post a link to the article/tutorial.

    Good luck; "The Truth is Out There."

    Jim

    When settling down in front of a computer to do something useful,
    Never say, or even think,
    "I will just do this quickly."
  • SystemAdmin
    SystemAdmin
    14225 Posts

    Re: Yes. But it's not really "Reverse Engineering" - Here's 1 of the 2 Tutorials

    ‏2006-06-27T19:52:47Z  

    Yes. But it's not really "Reverse Engineering". It's something about choosing the check box, "replace UML object" in representing code in a UML diagram, which is explained in a dWorks Tutorial or article released or re-announced in the last few months.

    Obviously, I can't remember the title or I would post a link here. I tried the feature when I was reading about it and it works as described, so that's the good news.

    I will try again to find it for you. Meanwhile, hopefully this will remind someone with a better memory than me, and they will post a link to the article/tutorial.

    Good luck; "The Truth is Out There."

    Jim

    When settling down in front of a computer to do something useful,
    Never say, or even think,
    "I will just do this quickly."

    Here's 1 of the (I think) 2 Tutorials that address this:

    http://www-128.ibm.com/developerworks/rational/library/04/r-3247/

    I'm still looking for the other one.

    Jim

    When settling down in front of a computer to do something useful,
    Never say, or even think,
    "I will just do this quickly."
  • Todd_Dunnavant1
    Todd_Dunnavant1
    3 Posts

    Re: Reverse Engineer Using RSA

    ‏2006-06-27T21:50:13Z  
    A Rational Services team has developed an RSA transformation that can either (1) transform Java code into a new UML model or (2) reconcile changes in Java code back into the UML model from which the code was generated. Contact your Rational sales or services team for more information. This transformation is available only by requesting it from your team, this isn't available for general download. If your team is unaware of this capability, tell them to look in the Rational Knowledge Base. This asset has been posted there as an internal asset, which can be provided to customers.
  • SystemAdmin
    SystemAdmin
    14225 Posts

    Re: Reverse Engineer Using RSA

    ‏2006-07-03T00:04:00Z  
    A Rational Services team has developed an RSA transformation that can either (1) transform Java code into a new UML model or (2) reconcile changes in Java code back into the UML model from which the code was generated. Contact your Rational sales or services team for more information. This transformation is available only by requesting it from your team, this isn't available for general download. If your team is unaware of this capability, tell them to look in the Rational Knowledge Base. This asset has been posted there as an internal asset, which can be provided to customers.
    I don't get the logic here. Why would such a popular function, which was open to its users in the previous versions, be hidden from the dreadful users? IBM still has a long way to go before becoming user-friendly.
  • SystemAdmin
    SystemAdmin
    14225 Posts

    Re: Yes. But it's not really "Reverse Engineering" - Here's 1 of the 2 Tutorials

    ‏2006-08-31T01:02:03Z  

    Here's 1 of the (I think) 2 Tutorials that address this:

    http://www-128.ibm.com/developerworks/rational/library/04/r-3247/

    I'm still looking for the other one.

    Jim

    When settling down in front of a computer to do something useful,
    Never say, or even think,
    "I will just do this quickly."
    Hello Jim

    I am frustrated because I tried the options sugested here, and also the tutorial, which is actually easy to follow, but can't get it to work. I work with C++ and have all the latest patchest applied for RSA.

    Having imported and compiled the classes, created a C++ project class diagram with all the classes (which I had to create a dummy class derived from one of my classes and then request infinite relations navigation so all classes could be visualized in the diagram, as it wouldn't accept the Visualize option directly from the .h files), THEN creating a UML blank model with a class diagram, again, I could not populate that diagram in any way, but I had to Harvest the C++ class diagram and paste on the UML class diagram, hence lost all interactions and relations.

    Obviously, creating a sequence diagram makes no sense, nor activity.

    I am still a bit confused wheter you can get the same functionality in RSA as in Together J where you could pick a Member function and have a nice sequence diagram of it with very little effort.

    Why can't I populate the UML model? is this a bug?
    Best Regards
    Bernardo Flores
  • SystemAdmin
    SystemAdmin
    14225 Posts

    Here is a good article.

    ‏2006-08-31T15:22:12Z  

    The article

    http://www.ibm.com/developerworks/rational/library/05/1220_smith/

    is long and technical, but seems to explain a lot relevant to all this confusion about whether RSA etc. support "Forward and Reverse Engineering", aka "Round Trip Engineering" or "Keeping the Model and Code in Sync".

    It is very hard to discover this article by ordinary means, so I'm posting it here.

    IHTH

    Jim

    When settling down in front of a computer to do something useful,
    Never say, or even think,
    "I will just do this quickly."
  • SystemAdmin
    SystemAdmin
    14225 Posts

    Re: Reverse Engineer Using RSA

    ‏2006-09-03T12:53:16Z  
    Hi

    You can downlaod a Java To UML transformation from our website at http://www.rsxplugins.com/downloads.

    If you have any questions, lpease drop me an email

    Best Regards

    Steve
    RSX Plugins
    http://www.rsxplugins.com