Book a Demo

Author Topic: import source directory gave me two of everything?  (Read 2975 times)

vauruSwjCZ

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
import source directory gave me two of everything?
« on: May 29, 2010, 04:52:50 am »
A co-worker initially created model objects by using the "Import Source Directory..." feature.  A week or so later I'm trying to update the model, and performed another import using settings of;

Synchronization: Synchronize existing classes, and
Remove classes not found in code: Always delete

Unexpectedly, I know have two of every class in the model, even of classes that were not modified at all.

What did I do wrong?  How best do I recover?

--CB

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: import source directory gave me two of everyth
« Reply #1 on: May 31, 2010, 10:25:49 am »
EA is not updating the existing class because they has a different filename from those being imported.
 
In order to get EA to update the existing classes you will need to update the filename of each class.  This can be done using the dockable properties window.  (View | Properties)
 
The delete one set of classes from the model I would do the following.
Open the local paths dialog. (Settings | Local Paths) In the path field enter the path that one of you used to import.
In the ID field enter something like "Source_Path".
In the type field select your source code language.
Click "Apply Path"
This will substitute the path you entered for the ID in all classes containing that path.
Edit the path field to a path where no code resides.
Re-run the source code import, allowing EA to delete all the classes.
You will now have only one set of classes.
Back in the local paths dialog, edit the path field to the other path used.
Click "Apply Path" again.
You should now have a setup that will allow both of you to use the classes effectively.

vauruSwjCZ

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: import source directory gave me two of everyth
« Reply #2 on: June 02, 2010, 12:42:24 am »
I suspected path might be an issue.  

Is it the case that if each developer ran code engineering in a standard folder, like "C:\system", this would also avoid the path issue altogether?

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: import source directory gave me two of everyth
« Reply #3 on: June 02, 2010, 09:09:47 am »
Yes, either the local paths feature or use a common path.