Book a Demo

Author Topic: problems with synchronizing model from source  (Read 7984 times)

Dan Christopherson

  • Guest
problems with synchronizing model from source
« on: February 11, 2002, 02:14:01 pm »
A little background first:
The model in question was created by importing XMI generated by 'that other product' 8^}). I then rearranged things a bit, and started to try to import/synchronize code (via 'Code Engineering|Import Source Directory...') that had been changed quite a lot from what was represented in the model. At this point, the closest I've gotten gives me every class twice: the original from the model and the one imported from source. Note that these are in the same package, and I did specify 'Synchronize existing classes'.
How does Enterprise Architect decide whether a class it's importing is the same as one currently in the model? Is this a known problem with what I'm trying to do?

Thanks in advance,
danch

unnamedharald

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
  • I love YaBB 1 Gold!
    • View Profile
Re: problems with synchronizing model from source
« Reply #1 on: February 12, 2002, 05:09:31 am »
I'm also having problems with synchronization.  I imported several .h files from one directory a while ago.  Now those same .h files (slightly changed inside hence the need to synchronize) are in another directory and I can't for the life of me figure out how to synchronize with the .h files in that new directory.  I have a lot of information in my EA class objects that I can't afford to re-enter by importing anew from the new directory.  The only way I can synchronize these updated .h files is to copy them to the "original import" directory but this quickly gets confusing (and a harder sell to other developers here who are curious about EA).  How do I tell the EA class object to synchronize from a different directory or how do I break the link to the original directory?  I tried setting the path in the Files tab but that had no effect.  This is driving me mad.

gsparks

  • EA User
  • **
  • Posts: 325
  • Karma: +0/-0
  • I love YaBB 1 Gold!
    • View Profile
Re: problems with synchronizing model from source
« Reply #2 on: February 12, 2002, 03:47:25 pm »
Hi,

As regards the issue of how EA decides when to Synchronize and when to add, this really just comes down to the EA model element having a file name to link to. This is automatically set when you import, so subsequent imports will check if this file exists, and if so will synchronize rather than import. You could manually set this relationship using the code generation dialog - but for a lot of classes this may prove unacceptable.

I will investiagte a bit further and see if there is a simple solution to your problem.

Geoff Sparks


gsparks

  • EA User
  • **
  • Posts: 325
  • Karma: +0/-0
  • I love YaBB 1 Gold!
    • View Profile
Re: problems with synchronizing model from source
« Reply #3 on: February 12, 2002, 04:08:07 pm »
Hi,

As regards the problem of file paths, this can be done using the Local Directories dialog (in the References menu)

Assuming you have a bunch of C++ files in "c:\source\old"  and now want to convert all imported EA classes to the new directory  "c:\source\new" ...

What you will need to do is the following:

1. Enter c:\source\old into the Path text box
2. Enter a substitute name into the ID text box: eg. CFILES
3. Choose a language type eg. C++
4. Press "Apply Path" this will convert all instances of the form "c:\source\old\<class.h>" to %CFILES%\<class.h> internally
5. Change the path to c:\source\new and press Save. Now the CFILES macro will be substituted to the new directory. If you press the Expand button, EA will replace all instances of %CFILES% with the path name - ie. c:\source\new
6. Make sure you reload the current diagram when you do this - as the file paths are cached when a diagram is opened


In this way you can move source around and even have multiple developers connect to a differently named shared drive, but still use the same directory.

If you are interested, the file name is stored in the t_object.GenFile column (you can open an EA project in MS Access 97/2000/XP and explore the information if desired)

Hope this helps
Geoff Sparks







danch

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
  • I love YaBB 1 Gold!
    • View Profile
Re: problems with synchronizing model from source
« Reply #4 on: February 13, 2002, 09:48:08 am »

Quote
Hi,

You could manually set this relationship using the code generation dialog - but for a lot of classes this may prove unacceptable.

I will investiagte a bit further and see if there is a simple solution to your problem.

Geoff Sparks




Thanks for your help. I've resolved this issue for this project by ignoring it: I just blew away all of the old stuff and started from scratch. Obviously, this is not a really happy thing, so if you can find a better way, I'd much appreciate it.

thanks again,
Dan Christopherson (danch)