Author Topic: Code Generation  (Read 6791 times)

anopres

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Code Generation
« on: February 15, 2005, 09:52:27 am »
If you add a language to EA, how do you get it to use the proper file extensions during code generation?

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8085
  • Karma: +118/-20
    • View Profile
Re: Code Generation
« Reply #1 on: February 15, 2005, 08:02:03 pm »
Officially you can't...  :'(

Unofficially you can import an MDG technology file that looks a bit like this.

Code: [Select]
<MDG.Technology version="1.0">
<Documentation id="YourLanguage" name="YourLanguage" version="1" notes="Sets the default extension for your language"/>
<CodeModules>
 <CodeModule language="YourLanguage" notes="">
  <CodeOptions>
   <CodeOption name="DefaultExtention">.extension</CodeOption>
  </CodeOptions>
 </CodeModule>
</CodeModules>
</MDG.Technology>


You could also use the technology wizard to create a file containing all the datatypes and code templates to include this in.  Then you will have a complete distribution file for your new language.

Simon

EDIT: The version can't be an empty string.
« Last Edit: February 16, 2005, 04:01:04 pm by simonm »

anopres

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Re: Code Generation
« Reply #2 on: March 15, 2005, 08:02:27 am »
Thanks Simon,
This works great!  ;D

anopres

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Re: Code Generation
« Reply #3 on: March 15, 2005, 08:13:30 pm »
I just posted a link to my MDG file for ColdFusion on my blog @ http://mrmx.blogspot.com/2005/03/cfc-generator-for-enterprise-architect.html

Please let me know if there is more that I can do to it.

I'm eagerly looking forward to looking into the reverse engineering possibilities in a future version of EA.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8085
  • Karma: +118/-20
    • View Profile
Re: Code Generation
« Reply #4 on: March 15, 2005, 08:21:32 pm »
I just had a brief look at it.  I don't know ColdFusion, but it looks pretty good.

You could also consider putting it on the EA User Group website.  (May want to see if a new category for MDG Technologies can be added)

http://www.eausergroup.org/

Simon
« Last Edit: March 15, 2005, 08:22:43 pm by simonm »

anopres

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Re: Code Generation
« Reply #5 on: March 16, 2005, 02:05:18 pm »
 :o I've been using this thing all day and it's great.  I just generated about 1200 lines of code in about 20 seconds.  This would have taken a couple of days normally.

Of course I still have to fish though it all and flesh it out, but the tedium is gone.

Is anybody working on one of these for Actionscript yet?

anopres

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Re: Code Generation
« Reply #6 on: March 18, 2005, 07:47:33 am »
I think adding ColdFusion as a language type would be awsome.  I don't think there is any product that can round-trip ColdFusion Components.

mikewhit

  • EA User
  • **
  • Posts: 608
  • Karma: +0/-0
  • Accessing ....
    • View Profile
Re: Code Generation
« Reply #7 on: March 21, 2005, 02:43:15 am »
Maybe that's why it hasn't been done - because it's literally awesome ...?

yehia.shouman

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Code Generation
« Reply #8 on: September 30, 2005, 11:05:23 am »
Dear All,
I made a tool that should convert your Enterprise Architect generated XMI files to actionscript files (classes generating the namespace structure folders as well).

This will convert your UML to actionscript 2.0 classes.

find its features below
http://osflash.org/doku.php?id=xmi2actionscript