Book a Demo

Author Topic: Class code not being generated  (Read 3762 times)

cbernaut

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Class code not being generated
« on: August 07, 2005, 11:49:30 am »
I have 115 classes in a package.  When I right click on the package folder in the Project View and click 'Code Engineering > Generate Source Code', only 54 of them are actually generated (in Java.)

What gives?  Where are the other ones? Why aren't all classes in the package coded?

Also, those classes from the package that do not have their code generated I can generate on an individual basis, so I assume that rules out syntax errors.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Class code not being generated
« Reply #1 on: August 07, 2005, 06:13:45 pm »
EA won't create filenames to generate to unless you ask it to.  (By pressing the 'auto generate files') checkbox.

The classes that you have already generated on an individual basis will already have a filename set, so they will generate.

Simon

cbernaut

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Class code not being generated
« Reply #2 on: August 07, 2005, 09:01:00 pm »
I've been indicating "auto generate files" every single time.   That's not the problem.

Let me show you exactly what I'm doing:


Figure 1: Project Stats (121 classes)



Figure 2: Code generation dialog



Figure 3: Result message



Figure 4: Actual Classes generated (only 55 - less than half)
« Last Edit: August 07, 2005, 09:01:36 pm by cbernaut »

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Class code not being generated
« Reply #3 on: August 07, 2005, 10:51:05 pm »
Well, I'm not sure of what's going on.

I do notice though that you have more packages than two.  Are all of your classes in that one package?

Is everything selected in the list?

Is there anything special about the classes that aren't generating? (eg. EntityContactLocator)

I also noticed some files that don't appear to relate to classes in your project view. (eg. EmployeeRole.java)

Can you give me any information on that?

Simon

cbernaut

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Class code not being generated
« Reply #4 on: August 08, 2005, 06:36:57 am »
All my classes (except seven in the data model) are in the pacckage 'KOM5'.  The other packages you are seeing are mostly the default ones, such as 'Activities' and 'Interactions'.

The list of classes to be generated is being selected by right clicking on the package 'KOM5' and then 'Code Engineering > Generate Source Code', so all the classes I want generated are there.



Anything special?  Well, many of the classes that don't appear in the class list are towards the bottom of the package since they are sterotyped as <<boundary>> or <<enumeration>>.

What it comes down to is that the code for these classes is generated if I go class by class down my package, but that is a major pain in the a**, as I'm sure you can appriciate.

I'd be more than happy to send you the *.EAP file offline or anything else you need to help you troubleshoot this.

Thanks!
Bryan

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Class code not being generated
« Reply #5 on: August 08, 2005, 03:29:04 pm »
Okay.  Send in your eap file to [email protected] and we'll have a look at it.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Class code not being generated
« Reply #6 on: August 08, 2005, 05:04:07 pm »
Thanks for the email.

I've replied, but I thought I should also include my response here in case anyone else also experiences the problem.

The reason why some of your classes weren't being generated was that they didn't have the language set.

To ensure that all the classes in a package have the language set to Java, right click on the package and select Code Engineering | Reset Options for this package.

In the dialog, set the from language to <all> and the target language to Java.

After doing that you should be able to generate all of your Java classes without any problems.