Book a Demo

Author Topic: Code generation  (Read 3884 times)

pab233

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Code generation
« on: May 27, 2004, 04:09:02 am »
Hi all,

Don't know if this has been discussed before, or whether I'm just being thick but ...

I've gone to generate my code, and according to the help, for any classes that don't already have file names, I will be prompted for a name for each.

However, I had roughly 10 classes without files, but was only prompted for a single file name.  The result of this is that I now have the code for all 10 classes in the same file.

Is this a bug?  Or as I said before am I just being thick?

This also leads to a secondary question.  Since all the classes are now linked to this single file, is there anyway to change the file associations in the generation scheme?

cheers
pab

angel-o-sphere

  • EA User
  • **
  • Posts: 112
  • Karma: +0/-0
    • View Profile
Re: Code generation
« Reply #1 on: May 27, 2004, 05:44:29 am »
Which programming language and which EA Version do you use?

angel'o'sphere

pab233

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Code generation
« Reply #2 on: May 27, 2004, 06:10:10 am »
C++ and v4.26

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Code generation
« Reply #3 on: May 27, 2004, 05:15:43 pm »
Hi pab,

I assume that you mean EA version 4.0 and build 726.

What happens will be dependant on how you generated all your classes.

You would have generated from the generate package dialogue, if you selected all the classes in a diagram and did a batch generate however you would have been asked for each file.

Simon

pab233

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Code generation
« Reply #4 on: May 28, 2004, 12:59:09 am »
Hi Simon,

Yes, I did mean v4 and version 726.

And yes, I generated from the Generate Package option.

So now to the second part of the question - is there anyway to change the filenames that are now associated with each class?

angel-o-sphere

  • EA User
  • **
  • Posts: 112
  • Karma: +0/-0
    • View Profile
Re: Code generation
« Reply #5 on: May 28, 2004, 02:44:37 am »
You should be able to generate the code again.

Check the otion "autogenerate files", at least with Java that works. In the "Synchronize" drop down try "Overwrite code".

For me that works fine (with Java).

angel'o'sphere

benc

  • EA Administrator
  • EA User
  • *****
  • Posts: 200
  • Karma: +0/-0
    • View Profile
Re: Code generation
« Reply #6 on: June 06, 2004, 08:00:25 pm »
Hi pab,

This dialogue should have prompted for each class that did not specify a file, rather than placing them all in the same. This was a bug and has been fixed for build 730.

Current work around:
- use the auto-generate feature alluded to or;
- specify the file paths prior to generation.

Thanks for letting us know.

Regards,
Ben