Book a Demo

Author Topic: Reverse Engineering yields empty class diagrams  (Read 3979 times)

eppinkf

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Reverse Engineering yields empty class diagrams
« on: February 09, 2007, 01:58:59 am »
Reverse Engineering yields empty class diagrams when files are read-only.

It seems that when I use EA to import C# files from a certain directory EA needs to have write access to generate the class diagrams. If the files and folders are read-only the classes are imported but the class diagrams are empty. If the files and folders do not have the read-only flag the class diagrams are fine.

Is this assumption true?
If yes why is this necessary? I do not see a reason why EA should have write access in order to generate the class diagrams.
It would be better to have the possibility to generate class diagrams without write access, as most of the sources in this project are in ClearCase...

Possibly this is a bug?

Feedback is welcome

Cheers
Frank

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Reverse Engineering yields empty class diagram
« Reply #1 on: February 09, 2007, 02:51:10 am »
Frank,

It does sound like a bug, or at least a surprising feature... I wonder what happens if we have to reverse engineer projects stored on CD-ROM and the like.

I'd suggest reporting this as a bug to Sparx. Use the Support link at the top of the forum page and choose Bug Report from the left-side menu of the resulting page. Or, from the EA main menu choose Help | On-line Resources | Bug Report Page.

Please let us know what, if any, info you receive from Sparx.

David
No, you can't have it!

eppinkf

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Re: Reverse Engineering yields empty class diagram
« Reply #2 on: February 09, 2007, 03:16:25 am »
I made another check and found out that the read-only flas is NOT the problem. I successfully imported C# classes in read only folders and files and everything was fine.

I guess the behavior I saw is related to the fact that I imported the same (or different versions of) classes several times into one EA project. I have to investigate further.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Reverse Engineering yields empty class diagram
« Reply #3 on: February 09, 2007, 03:22:29 am »
I think there is an option someplace to not overwrite existing model elements. Perhaps there is some combination that senses that you already have the code, then makes a copy without the methods (re)defined.

Still, the fact that you are getting an empty copy rather than not overwriting the existing packages might be an issue. Perhaps this is worth looking at more closely. I wonder if I have a 'pure' (class structure) example of C# code (or any code) that would do this, but I think not.
No, you can't have it!

eppinkf

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Re: Reverse Engineering yields empty class diagram
« Reply #4 on: February 09, 2007, 04:06:02 am »
The option "Overwrite existing classes" under "Synchronization" solves the problem of generated empty class diagrams. The disadvantage however is that existing diagrams (class and sequence) in other packages are destroyed.

My consequence:
- In one EA project a set of C# classes can be only kept once.
- For a different version of this set of C# classes create a separate new EA project

This approach is okay for me.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Reverse Engineering yields empty class diagram
« Reply #5 on: February 11, 2007, 12:56:44 pm »
A third thing that you can do is to import the code from a different location.  ie. C:\MyProject\Version\

This will mean that EA will not synchronize with the existing classes (or delete them) in the model during import.