This site uses cookies to deliver our services and to show you relevant ads and job listings.
By using our site, you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, and our Terms of Service.
Your use of Stack Overflow’s Products and Services, including the Stack Overflow Network, is subject to these policies and terms.

Join us in building a kind, collaborative learning community via our updated
Code of Conduct.

I've made a model in Enterprise Architect using the 'reverse engineering' tool to import my Java classes into the EA model. Now I intend to keep this model up-to-date with the code as the development goes on.

The thing is: when I try to synchronize the code within the model (source -> model) it only works if the source code is still in the same absolute path it was in the disc when I first imported. But if I change the source code's location on the disc, it duplicates my classes.

That is a huge problem considering that every developer has it's own folder structure. It can get worst when it comes to different operational systems (which is my case).

Example:

Location of the source code when it was imported:

/Volumes/Data/Projects/xxx_project/src/...

Location of the source code when it has to be synchronized by another developer:

C:\projects\xxx_project\src\...

Does anybody know how to use a "relative path" to the source code, or to change the binding of the source code's location on the model?

2 Answers
2

The solution is to use a feature called "Locale Paths" in EA.
You find it in the menue item Settings-->Locale Paths...
It opens a dialog box that enables you to replace local paths in the model with an ID and vice versa. With this feature it is possible to replace a present path in the model with another one. It also gives you the possibility to use the model on different machines with different local paths.

To find out to which local path a given class in the model was bound I grepped the binary file of the model. Then I replaced the path name with the buttons ApplyPath and ExpandPath. To me it seemed that the changes in the model concerning the path take effect not until closing EA and restarting it again.

After that it was possible to see the source code of a class by right clicking the class and executing "View source code..." at the new location on the disk.