Book a Demo

Author Topic: How to manage coding updates across diagrams  (Read 4358 times)

imichel

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
How to manage coding updates across diagrams
« on: October 16, 2010, 08:27:12 pm »
All,

I have a class model which was imported from my co-workers local sandbox and reverse engineered.  After a few weeks I have updated the model with some new classes and modified some methods and I want to update the mode he imported.  In order to update the model I selected Code Engineering -> Import Source Directory and then checked "sychronize existing classes".  After the import was complete I see that EA did not overwrite my existing model but created a new namespace of the same name with my new classes.  This is fine as long as I can find out which diagrams reference my Class model.  There are literally hundreds of classes and I don't know which ones are referenced.   I'd like to be able to delete the old namespace and have all diagrams which referenced the old one point to the new namespace.  Is there a way to search for all diagrams which reference any of the classes in my model, without having to click on each model element and "Find References"?  This would take forever.  

Maybe I also did the import wrong, because I was expecting it to "sychronize" with the existing namespace.  I am importing from the same code base, just a different sandbox so I think EA might have gotten confused.  

Any thoughts?

Thanks,

Ian :-X

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: How to manage coding updates across diagrams
« Reply #1 on: October 18, 2010, 08:47:00 am »
The main reason why EA would duplicate classes is because the classes in the model were originally imported from a different source path.

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)
 
A bulk update of class filenames when a directory path has changed can be made using local paths (See http://www.sparxsystems.com/enterprise_architect_user_guide/8.0/software_development/localpaths.html) as follows.
 
Open the local paths dialog. (Settings | Local Paths) In the path field enter the path that EA currently thinks your files are at, or part of it.
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 your new path.
EA will now find the files in their new paths.
If you want to you can now click "Expand Path" and then delete that path.
That will remove the relative paths that were created before, setting them back to absolute paths.
« Last Edit: October 18, 2010, 08:48:00 am by simonm »

imichel

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: How to manage coding updates across diagrams
« Reply #2 on: October 18, 2010, 10:29:00 pm »
Thanks so much for your help.  I'll try these steps, but do you know how to tell what the original sandbox/local path that was used to create the model is currently?  If I right click on the top-level model package and go to properties I don't see any path listed.

Thanks!

Ian

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: How to manage coding updates across diagrams
« Reply #3 on: October 19, 2010, 08:24:30 am »
Packages don't have the path set.

Select one of the classes and press Alt+1.  Filename will be in that view.