Book a Demo

Author Topic: Lost track of source files on reverse engineer  (Read 3742 times)

cafetorium

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Lost track of source files on reverse engineer
« on: January 14, 2008, 02:07:43 am »
I created a model from one of our existing projects by importing its c# source files.

While I was working on the model, one of my colleagues was editing some of those source files because it is an active project.  So I had to re-import them to bring the model up to date.

However, I ended up with duplicate classes instead of the existing classes being updated to reflect the changes.

This has never happened before - usually the classes get updated.

How can I get EA to recognise that they are the same classes and that the existing ones should be updated?


Martin Terreni

  • EA User
  • **
  • Posts: 672
  • Karma: +0/-0
  • Sorry, I can't write
    • View Profile
Re: Lost track of source files on reverse engineer
« Reply #1 on: January 14, 2008, 04:36:16 am »
Interesting...
Have you told EA to synchronise (not import)? have the classes chaneged name?
Recursion definition:
If you don’t understand the definition read "Recursion definition".

cafetorium

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Lost track of source files on reverse engineer
« Reply #2 on: January 14, 2008, 04:42:12 am »
I've tried both Synchronise and Import.

Synchronise appears to do nothing - the original attributes of the classes remain.

Import creates the duplicate classes.


No, the classes haven't changed name.


If I can't fix it, I'm just going to create a new project and import from scratch.

Phil

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Lost track of source files on reverse engineer
« Reply #3 on: January 14, 2008, 05:35:46 am »
Make sure the source files have not moved. When reverse engineering - possibly when forward engineering - EA stamps each class with the absolute path to the source file. If this path does not match an appropriate source file in future, EA won't align the source and model correctly. In such a case EA plays it 'safe' and generates a new class.
No, you can't have it!

cafetorium

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Lost track of source files on reverse engineer
« Reply #4 on: January 14, 2008, 05:47:59 am »
That's probably the answer.
Thanks for that.

I created the model and then moved it to a shared directory on a server.

There are 3 developers using EA to access the model.  However, each developer has their own copy of the source files on their local hard drive.

I have the shared directory mapped to the S: drive, and we all use C:\Development for the source.

If I can get the others to map the S: drive as well, and then re-create the model on S:, then the bindings should be the same for all of us.

Phil

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Lost track of source files on reverse engineer
« Reply #5 on: January 14, 2008, 06:14:51 am »
Perhaps you can use the Local Paths feature here. I simply don't know, but perhaps it would work. If so you might only need to have the developers map appropriately. I have no idea what would happen if they switched the mapping between the shared and local code base, but it might be worth experimenting.

David
No, you can't have it!