Book a Demo

Author Topic: Code generation for project always Java  (Read 2773 times)

cforrester

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Code generation for project always Java
« on: September 27, 2004, 08:45:27 am »
Not that I have anything against Java, but this project requires C#. The default is set to generate C#, and the classes are marked as Java, but when generating a batch for the project, it is always Java.  There is no way to specify the target language when generating a batch for a project as there is for generating a single element.

Note that some packages will generate C#, but some won't.  I've deleted code from target folder and regeneated. I've closed EA and reopened.

Am I not holding my tongue just right? Tips?

Update: I notice that even in a specific project (folder) one class may be .cs and another is .java. Generating the individual element again, and setting the target to C# does not update the path. Is this a case of EA setting internal settings that are never changed?
« Last Edit: September 27, 2004, 08:54:44 am by cforrester »

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: Code generation for project always Java
« Reply #1 on: September 27, 2004, 04:03:39 pm »
Tools>Options>Generation>Default Language For Code Generation

hth
Bruce
"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Code generation for project always Java
« Reply #2 on: September 27, 2004, 04:49:26 pm »
When doing a package generation or batch class generation EA will always use the language set for each class.  You'll need to do it before then.  It is possible in a package generation to make it reset names, but I'll give you an answer that will allow you more control than that.

Under the Project View there is a Code Generation button.  Click on the little down arrow there and select 'Reset source code language'.

Fill that dialog out like the following.

Where language is: Java
Convert to: C#
Clear Filenames

For more information try the help button on the dialog.

Then you should be able to do a generate and be prompted for filenames or do a package generate and set 'auto generate files' (and don't check 'Retain Existing File Paths')  The second option will set the filepaths for each class.

Simon