Book a Demo

Author Topic: Code Generation - customize paths  (Read 4141 times)

bouche

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Code Generation - customize paths
« on: March 11, 2009, 05:33:15 am »
I'm trying to generate code from a model. The classes are in a model called 'Analysis Model' and I want to generate the class code in a folder call BLL.

However, when I try and generate the code, EA is creating an Analysis Model folder within the BLL folder and then it is placing the files in Analysis Model folder.

How can I make EA generate the files into the BLL folder and  make sure that it doesn't create any folders?

thx

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Code Generation - customize paths
« Reply #1 on: March 11, 2009, 03:52:04 pm »
Hi!


You didn't specify what implementation language you're using. This would help, since EA's code generation is language-aware. I'm going to assume you're in C++.

Here's a few ways.

1) Place everything in a BLL Package inside the Analysis Model and generate from the BLL Package rather than the Analysis Model, which I assume is a View anyway.

2) Don't allow EA to auto-generate file names, pick them one by one instead. EA remembers which directory you selected for the previous Class so although the work is tedious it doesn't take that long; also the file names are kept so you'll only have to do it once.


1) feels like the best UML solution to me.
2) is safest if you want full control.

Cheers,


/Uffe
My theories are always correct, just apply them to the right reality.

bouche

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Code Generation - customize paths
« Reply #2 on: March 12, 2009, 12:27:16 am »
Thanks.  That would certainly work.

I also found the dialog under Code Engineering called "Reset Options for this Package".  That allowed me to clear everything and then set each file's location when it was time to generate.  That worked and allowed me to ignore any package names that he classes were contained in.