Book a Demo

Author Topic: Updating code from modified sequence diagrams.  (Read 5139 times)

O.K.

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Updating code from modified sequence diagrams.
« on: April 29, 2009, 09:46:40 pm »
Hello,
EA does not seem to map changes to sequence diagrams to the code.
The first time the code generation works, but changing the diagram afterwards (And,of course, saving, reloading etc.) does not result
in a change to the code.

Regards, Oliver

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Updating code from modified sequence diagrams.
« Reply #1 on: April 29, 2009, 10:23:50 pm »
Hi Oliver,

You referred to this in your other thread, then said you'd solved the problem (and started this thread).

Have you solved the problem for only the first attempt, and thus started this thread because you cannot generate thereafter? Or have you solved the problem in general, and this thread is out of date?

In the former case, here are some questions that might help you get oriented (or provide more complete information if this turns out to be a bug). In no particular order:

What process are you going through?

Have you played around with the various synchronization options on code generation (and reverse engineering)?

Are you sure you are using the same paths to the source files?

What exactly is not changing? Are you seeing obsolete methods (calls and such) that are not removed from the new code? Are methods retaining signatures that should have been changed by the new sequence diagram?

David
No, you can't have it!

O.K.

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Updating code from modified sequence diagrams.
« Reply #2 on: April 29, 2009, 10:56:39 pm »
Hello David,
thanks for the fast reply.
The last thread was about me not being able to generate any code
from sequence diagrams. Since I am now able to do so, I closed the thread.
My current problem is that I cannot update the generated code:
Once it is there, EA will not modify the code after the diagram has changed. Only when I delete the file manually and regenerate the file, the code is correct.
I have checked everything (paths, synch options etc.) multiple times. Code generation works fine for classes both using the Visual studio addin and using simple path-based file generation.
As I said above, it works for sequence diagrams only THE FIRST TIME,
when there is not already some auto generated file present for the class containing the diagram.

Best regards, Oliver

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Updating code from modified sequence diagrams.
« Reply #3 on: April 30, 2009, 10:26:36 pm »
Oliver,

In the EA help index, look up Code Engineering. Then scroll down the sub-entries to the ones that start with Settings, Synchronization and Synchronize. There are several entries that mention how to set up forward engineering. Find the ones you need and try them out.

Let us know if any of these make a difference.

David
No, you can't have it!

O.K.

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Updating code from modified sequence diagrams.
« Reply #4 on: May 04, 2009, 09:29:20 pm »
Hello David,
there are no additional options  for sequence diagrams etc.
Since code engineering works for everything else, I will file a bug report.
This was anounced as a major feature but the documentation is minimal.

Best regards,
Oliver
« Last Edit: May 04, 2009, 11:18:27 pm by lordolin »

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Updating code from modified sequence diagrams.
« Reply #5 on: May 05, 2009, 03:22:50 am »
Sigh...

Please post back if you hear from Sparx on this issue.
No, you can't have it!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Updating code from modified sequence diagrams.
« Reply #6 on: May 06, 2009, 07:56:40 am »
Code synchronization never changes method bodies.  Behavioral code generation only works when generating the entire file.