Book a Demo

Author Topic: Reverse Engineering  (Read 3214 times)

mcgm2

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Reverse Engineering
« on: May 20, 2005, 03:35:20 am »
Hi, all!

I have a problem with reverse engineering.

I have a package and a class diagram into it. I'm importing a java class from the source code and... nothing happen... the class isn't there!!! I did the same with other classes and other packages and all was all right.

Somebody can tell me what is happening???

(I have a registered copy of EA, version 4.10.739)

Thank you very much!!!

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Reverse Engineering
« Reply #1 on: May 20, 2005, 04:06:02 am »
As you may have seen from my rant on stereotypes and code engineering,
http://www.sparxsystems.com.au/cgi-bin/yabb/YaBB.pl?board=general;action=display;num=1116516647
code engineering can be problematic.

I've had good responses from Sparx Today (offline) and repairs are progressing...  However, in the interchange I did some further testing and found that there are continuing synchronisation issues between the time you do things and the time EA reacts to them.
I haven't been able to get a good handle on things, but I'm no longer surprised to tell EA to do something, and it not doing it and asking a second time to do it and EA now doing it.

Also, and this is more particular to your problem, I number of times today there were syntactic problems with the files and EA didn't always catch and report them.  Thus I had a similar problem to you .  Create an empty class with name x.  Attempt to RE x.cpp and x.h into x - nothing.  Do this a couple of times - still nothing.  Exit EA, come back in, try again - now EA correctly reports a syntax error and that's what appears to have been stopping the reverse engineering.  It just wasn't telling me!

SO.. the upshot is.  Check for syntax errors.  And check that any process you go through is repeatable...  That you can CONSISTENTLY (that word again!) get the same results for the same input and process.

Paolo
« Last Edit: May 20, 2005, 04:07:42 am by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Reverse Engineering
« Reply #2 on: May 23, 2005, 07:37:04 pm »
If you have source code that doesn't import into EA that you think it should, the easiest thing to do is send in an example.  (Use the online form or send an email to [email protected] including your build number and repository type at least.  More information is better)

Ideally, you would cut your example down to the minimum that causes the problem.

Simon

danS

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Reverse Engineering
« Reply #3 on: May 25, 2005, 07:47:21 am »
Quote
Hi, all!

I have a problem with reverse engineering.

I have a package and a class diagram into it. I'm importing a java class from the source code and... nothing happen... the class isn't there!!! I did the same with other classes and other packages and all was all right.

Somebody can tell me what is happening???

(I have a registered copy of EA, version 4.10.739)

Thank you very much!!!


Does your code have any Java 5.0 features in it?

I was running EA 4.7 earlier today doing code imports. Any class that contained the new Java 5.0 syntax just simply did not show up.

I upgraded to EA 5.0 and the problem went away.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Reverse Engineering
« Reply #4 on: May 25, 2005, 03:33:05 pm »
That's a good point Dan, I should have thought of it.  (Although there has never been an EA 4.7)

Java 5.0 (or 1.5) support was added in Version 4.51 build 747, so that's almost likely to be the problem.

Simon

pjf

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Reverse Engineering - how to specify path to src
« Reply #5 on: May 26, 2005, 12:12:34 am »
 :-/
Hi all,

I'm having trouble reverse engineering code where the source code is no longer in the location where it was originally generated.

I can't find a place to set the new source path.

There is a "default source path" on tools->options->generation->java, but this doesn't seem to help.

I have tried the reverse engineering by
- rt click on component in explorer view
- rt click on component in diagram
- project->source code engineering->synchronise

Any help would be appreciated

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Reverse Engineering
« Reply #6 on: May 26, 2005, 03:11:09 pm »
Each class in EA stores where it's file is.  If you move that code you will need to update each class with the new file position.

Fortunately, there is an easy way of doing this.  :)

Go to Configuration | Local Paths from the main menu.

Enter the old path, any ID, and the language used into the relevant fields.

Click apply path.

Change the path to your new path.

Now you can either click Save, or Expand path.  But either way EA will now be able to find the correct path to the file.

Simon