Book a Demo

Author Topic: How to change genfile path in automated way  (Read 2323 times)

TheBigW

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
How to change genfile path in automated way
« on: April 07, 2010, 12:54:13 am »
I imported a xmi file (package) created from different machine. when I imported into my machine I could not sync with the code in my machine because its (genfile) referring to header file in a different path.
Could you please let me know the easy way to change the genfile path?

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: How to change genfile path in automated way
« Reply #1 on: April 07, 2010, 08:47:06 am »
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.au/EAUserGuide/index.html?localpaths.htm) 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.