Book a Demo

Author Topic: Code Generation from State Diagrams  (Read 2632 times)

Walex

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Code Generation from State Diagrams
« on: October 24, 2005, 10:13:30 am »
Hi there:

I would like to know if is possible to modify the code generation templates to generate code from a State Diagram. in EA.

Currently, I'm able to generate a basic code structure from a class diagram, but I would like to link that class diagram to a State Diagram and implement the states as methods of the class (automatically, without having to add a new method to the class whenever I add a new state on the State Diagram).

Additionally, I would like to know if somebody has a comprenhensive tutorial to the code generation templates.

Thanks!

Alex

thomaskilian

  • Guest
Re: Code Generation from State Diagrams
« Reply #1 on: October 24, 2005, 11:56:54 pm »
You can write an Add-in to assist you, but there are no standard tools for what you want to do.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Code Generation from State Diagrams
« Reply #2 on: October 25, 2005, 11:08:38 pm »
The code generation templates do not have direct access to State diagram information.  They can however call an addin which can access that information via the automation interface.

There is no tutorial for the code templates, but the documentation is available in the EA help file and at http://www.sparxsystems.com.au/EAUserGuide/index.html?codetemplates.htm.  Additionally, the built in code and transform templates are a good example of how the templates work and what you can do with them.