How to Set the Default Language for a New Model Repository
written by Phil Chudley, Principle Consultant at Dunstan Thomas Consulting
A question I am asked quite often is "how can set the default language to a new repository, other than Java".
As far as I know there is no global EA prefernce to acheive this, so most EA users would
- Create a new local repository
- Make the Code Engineering toolbar visible if not already visible
- Change the language to <none>, or some language other than Java
I tend to use the language setting of <none>, this article describes a method of acheiving the objective of having a default language other than Java preset for all future new local repositories.
EA iis installed by default into the directory C:\Program Files (x86)\Sparx Systems and in this folder are three repositories all named EABase. Theses three repositories are for *.eap,*.eapx and *.feap repositories. When a new local repository is created one of these EABase repositoriesis copied into the user folder and renamed according to the name entered by the user.
To set a default language, we siimply:
- Open a EABase repository in EA
- Change the Code Engineering language to your preference
- Close EA
Sounds simple? But there's a catch, since the EABase repositories are located C:\Program Files (x86)\Sparx Systems they cannot be opend for writing in EA!
- Copy all three EABase repositories to a directory of your choice
- Open one of these repositories in EA
- Set the Code Engineering language to your preference
- Repeat steps 2 and 3 for the remaining 2 EABase repositories
- Copy the three EABase repositories back to C:\Program Files (x86)\Sparx Systems Please note, you will need to have Adminstrator privilege to do this
Now, whenever a new local repository is created it will have the Code Engineering language that you set in the steps above.
I hope you find the above a useful trick, but there is more you can do with this trick. As the EABase repositories are copied to form your new local repository, then here are some additional changes that you might like to make to the EABase repositories:
- Modify any General Types like Status, Priority
- Create a default structure other than just a Model Root Node
- Import useful resources such as scripts, documentation templates
In fact anyhthing that is repository based that you wish to include as standard in all your new local repositories.
Yes, the only condition of this working is that you must have Adminstrator privilege to achieve the copy back to C:\Program Files (x86)\Sparx Systems (or know someone who has got Adminstrator privilege for your workstation / lapto), but it is a useful trick to know,
Dunstan Thomas Consulting
follow me on Twiter @SparxEAGuru