Book a Demo

Author Topic: Change path of source files in the model  (Read 15870 times)

Tomsn

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Change path of source files in the model
« on: October 31, 2009, 02:44:46 am »
Hallo,

in EA we use the forward and backward source code engineering quite often.
Now the physical path of the source files in the file system changed, due to some refactoring, which not applies to the package structure of the java project, rather than the path the whole package structure is stored.

The result is, that I cannot use the "synchronize package with code" feature any more. I could reverse engineer my whole project, but that would mean, that all my diagram modifications were lost, due to the newly imported model elements now have a different (ea internal) identity.

Maybe my whole approach to handle this is wrong. I appreciate any hint or assumption.

Thanks a lot.

Tomsn

Aaron B

  • EA Administrator
  • EA User
  • *****
  • Posts: 941
  • Karma: +18/-0
    • View Profile
Re: Change path of source files in the model
« Reply #1 on: November 02, 2009, 11:17:09 am »
You can apply a Local Path in EA to help manage changes in your source file directories.
http://www.sparxsystems.com/uml_tool_guide/code_engineering/localpathdlg.html

- Create a new Local Path and specify the path to the old root directory of your source files.
- Click "Apply Path" (you should see a message like "Process Complete! n records affected").  This will replace all instances of this old directory path in your model with a Path ID like "%MY_SOURCE_DIR%".
- Still in the Local Paths window, change the Path for this new ID to the location of your new source directory.  Save.

All your existing Classes in EA should now be re-directed to the appropriate source directory.

Tomsn

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Change path of source files in the model
« Reply #2 on: November 02, 2009, 08:48:52 pm »
Thank you, it works  :)