Book a Demo

Author Topic: Default Language for Classes, Components  (Read 3706 times)

twgathings

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Default Language for Classes, Components
« on: April 04, 2009, 04:28:27 am »
I did a search for this unsuccessfully. How do I set the default language? It's always Java but I want it to be C#. Is there a global setting for this? Thanks in advance.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Default Language for Classes, Components
« Reply #1 on: April 04, 2009, 07:58:42 am »
There's a catch-22 here. EA stores the default language in each individual project, but...

When you create a new project using the 'normal' EA method, what EA actually does (behind the scenes) is clone (parts of) a 'seed' project. The default seed project is EABase.eap, it lives in the EA installation directory. The factory settings - the content of the seed project included in the EA installation kit - include Java as the default language.

The end result is that when you create a new project it 'inherits' the Java default language setting. Great if you are a Java shop or if you don't care. Not so great if you use a different paradigm.

Here's what you can do.

Make a backup copy of the seed project (in case you ever need to revert). Now edit the original (with the original file name) copy to use your preferred default language. Now save the project with the new setting. In future this will become your default. Note that in recent versions of Windows you might not be allowed to edit and save the file in the default location, even with Administrator privilege. EA itself might not allow this. You can copy it elsewhere (after making a backup copy of course), edit and save it there, then copy the modified version back over the original.

You can also create your own seed projects, saving them somewhere convenient. Then you can use the EA Start page to clone them when you create projects. On the EA Start page you will see a link near the top left called Copy a Base Project... Click that and you should be OK. This method is really useful if you have several common configurations you use for different projects.

If you really want to you can edit the Windows Registry to change the default seed project. I do not recommend this route unless you are really certain of what you are doing. Note that it is very easy to forget you've done this, which makes editing setting quite difficult in future. You might be editing the wrong file, so your changes never get picked up. [One guess how I learned this...]

HTH, David

PS: Note that the above methods work for other settings that are stored with each project and are inherited from the seed file. You'll see a few of these as you go on.
No, you can't have it!

Takeshi K

  • EA User
  • **
  • Posts: 632
  • Karma: +43/-1
    • View Profile
    • Sparx Systems Japan
Re: Default Language for Classes, Components
« Reply #2 on: April 05, 2009, 09:13:19 am »
From the Main menu, select Tools | Options, and then select the 'Default Language for Code Generation' in the 'Source Code Engieering' group.

Hope This helps,
--
t-kouno

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Default Language for Classes, Components
« Reply #3 on: April 06, 2009, 01:20:13 am »
But T, he will have to do this on each project when he creates it. What I was explaining was how to 'reset' this default.
No, you can't have it!

twgathings

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Default Language for Classes, Components
« Reply #4 on: April 06, 2009, 11:54:00 pm »
Thanks to both of you. Honestly, I didn't know how to set that option on an individual project either. I also explored Template Packages, so I'm all set now. Thanks again, much happier now!