Book a Demo

Author Topic: Changing the Source Code Path  (Read 3682 times)

TS1

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Changing the Source Code Path
« on: December 09, 2011, 11:13:27 am »
How can I change the 'local path' of source code previously imported under a different 'local path' (and allow synchronization with the new 'local path')?

SomersetGraham

  • EA User
  • **
  • Posts: 376
  • Karma: +1/-0
    • View Profile
Re: Changing the Source Code Path
« Reply #1 on: December 09, 2011, 07:11:50 pm »
Hi
When you generate code for classes (F11) you can change the path in the generate code dialog
If you generate code from the package level you can change the path in the generate package source code dialog
Using V12

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Changing the Source Code Path
« Reply #2 on: December 12, 2011, 08:45:23 am »
Open Settings | Local directories and Paths.

If you didn't use a local path when you originally imported the code, add a path and click 'Apply Path'.

Either way, you can now change that path and click 'Save'. All classes will now use the new path.

TS1

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: Changing the Source Code Path
« Reply #3 on: December 14, 2011, 12:44:43 pm »
Simon,

Thank you for the suggestion, but it didn't seem to work. Let me add a bit more detail.

I had previously imported Java source code into a model and used references/links to various classes in different system view diagrams (hence don't want to risk losing these links). I now want to change the location of the source code directory in my file system. I tried your suggestion by opening the 'Local Paths' dialog and added a new path. I also 'Applied' the path. The response message suggested that it applied the path change throughout the class model. However, when I used the 'Open Source Directory' command on a class, it opened to the original directory. Did I miss something?

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Changing the Source Code Path
« Reply #4 on: December 15, 2011, 08:33:42 am »
I'll be a little more explicit. In the local paths dialog:

Create a new path corresponding to your old path.
Apply the path. (At this point you can check that it has applied correctly by viewing the properties (Alt+1) of a class that used that path.)
Now you can modify the path to your new path. (At this point the classes should open to the new location.)

Optionally, if you don't like having the escaped paths in your model you can now expand the path.

TS1

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: Changing the Source Code Path
« Reply #5 on: December 17, 2011, 11:30:28 am »
Simon,

Thank you for the explicit instructions. I think I've got it now.

Cheers.