Sparx Systems Forum
Enterprise Architect => General Board => Topic started by: akatayama on July 28, 2006, 04:29:08 pm
-
I have been occaisionally using EA to generate UML diagrams from our C++ source code in order to avoid most of the tedious data entry of putting one together by hand. I find it particularily helpful in the middle of an active development, where keeping the diagram in synch manually can be very tedious.
Though the resulting diagrams generally need some clean-up, it's definitely worth the effort as the time it saves is still considerable.
:)
Here's my question. I seem to have been able in the past to open up the last generated (and manually cleaned-up) EA file and re-run the reverse engineering process. Somehow it would magically (under most circumstances) know when a class has been updated vs. when a new class has been introduced. How it ever performed this sort of magic, I have not thought much about, until recently when I seemed to have lost this capability from EA all together.
???
Suddenly when I would go through the same process it would duplicate all of the classes that were previously created, treating each class as if it were a new class. And since they were not matched up to the previous versions, which were carefully laid out manually on the page, all of these duplicate classes massed together into the upper-left corner of the diagram. This is certainly not what I was expecting.
:-/
So this begs the question. What mechanism does EA rely upon to track changes to the design when an updated design is reverse engineered into an existing drawing. Knowing that, I might be able to figure out what I can do to get the reverse engineering process to work correctly for me again.
Or more importantly, what can I do or try to get this process to work again?
Any of your thoughts, experiences, suggestions, and definitely solutions, will be greatly appreciated!
- akatayama
-
EA uses the class name and the filename to link between the code and model. The most common cause for people losing the synchronisation between the two is a change of source code location. Some people also end up with models where EA no longer has the filename for each class. So I would recommend checking for this first.
The filename for a class is shown in the properties window (View | Properties) when that class is selected.
If your model is a shared one and different users have the source in different locations you can use our local paths feature to account for this.
If your entire source has moved location you can change paths of classes in bulk by using the local paths feature as follows.
Open the local paths dialog. (Settings | Local paths)
Enter the old path, any id and the language they apply to.
Click apply path.
Change the path to the new path.
Click expand path.
You may then want to delete the path.
For more information on local paths please see http://www.sparxsystems.com/EAUserGuide/index.html?localpaths.htm.
If the filename is empty, there isn't much I can suggest other than re-entering the filenames for each class before importing.
I hope that helps.
-
Thank you for your prompt reply!
I did relocate the files used in my project, so I am sure your answer will help. Thank you again!
- akatayama
-
Dear EA,
If the filename is empty, there isn't much I can suggest other than re-entering the filenames for each class before importing.
I finally got back to looking at my old EA file, and as far as I can tell, all file information is missing from my classes. Just to make sure I'm doing this right, I'm looking at the Files tab of the properties dialog box. Is that correct?
Since I found them all empty, per your reply I started to add in the file path information to where my files are currently residing. After finishing that step with all of the classes in my diagram, I then re-imported the C++ source code in order to update my drawing with the latest changes. I was surprised to see that all of my classes were again duplicated, with EA apparently not being able to match-up my existing classes with the new ones just imported. What could I be doing wrong in this step to make this process fail?
Perhaps this is a clue, but when I checked the properties on all of the new duplicate classes that were created during the C++ reverse engineering process, I found that none of them had their file property filled-out. Is that not supposed to happen automatically during the C++ reverse engineering process, or do I have some configuration option issue? (Though since my old file showed no signs of any filenames in the property field, perhaps it never had worked for me...)
As always, your input and suggestions are deeply appreciated.
And thanks again for creating a wonderful product!
Best regards,
akatayama
-
I finally got back to looking at my old EA file, and as far as I can tell, all file information is missing from my classes. Just to make sure I'm doing this right, I'm looking at the Files tab of the properties dialog box. Is that correct?
No, that is incorrect. The file for a class is not represented on that dialog at all. It is found in the docked window called Properties can be diplayed selecting View | Properties from the main menu.
-
I am fighting similar issues where the source files have moved. On one class the properties showed no associated filename (perhaps it was manually added). I pointed the Filename to the the correct C++ header file, but the "Synchronize Model with Code..." command does nothing on this class. As far as I can tell it is not locked. What could be causing the synchronize to fail?
-
:)
Case resolved. It turns out that the class was manually added and that there was a slight difference in character case on the name of the class. Therefore EA [correctly] did not synchronize with the differently named class in the header file.