Book a Demo

Author Topic: Problem creating new source code template  (Read 3218 times)

blackcat2957

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Problem creating new source code template
« on: July 05, 2013, 02:45:21 pm »
I'm using the eval version 10 and trying to see if I can create source code for a language not listed - InterSystems Cache'

So I created a simple class 'person' with a few attributes, created a new language template with the appropriate commands to create my source code (as XML) and then tried to generate source code. I have set the correct new language in the class properties...

The problem is that it keeps generating Visual Basic code! The data types however are coming from those set for he new language (%String, %Integer etc)

a) is this a limitation of the trial version?
b) is there something else I need to do to cause the selected language to be generated based on it's template?

Thanks,
Colin
« Last Edit: July 05, 2013, 02:46:14 pm by blackcat2957 »

g.makulik

  • EA User
  • **
  • Posts: 355
  • Karma: +0/-0
    • View Profile
Re: Problem creating new source code template
« Reply #1 on: July 05, 2013, 04:43:00 pm »
First you have to define the new language by giving it's primitive datatypes. I don't have a link at hand, but AFAIR that's in the Settings menu somewhere.

UPDATE:
I had some time to find it now  ;) ...

It's under menu 'Settings->Code Datatypes' and opens this dialog:


Uploaded with ImageShack.us

Choose 'Add Product' and give your new language a name.
Define the primitive/intrinsic data types your language supports.

Afterwards your new language will appear in several places related to code engineering (including code template framework).

You seriously should consider to setup a MDG-Technology for this (including a profile, these datatype definitions and sevral other necessary definitions (e.g. as the default language file extension(s), a.s.o.), to have it applicable to other's than the current model you're working on.

HTH
Günther
« Last Edit: July 06, 2013, 04:36:05 am by g.makulik »
Using EA9.3, UML2.3, C++, linux, my brain, http://makulik.github.com/sttcl/

blackcat2957

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Problem creating new source code template
« Reply #2 on: July 08, 2013, 02:32:51 pm »
It's OK I figured it out. The 'File' template needs to have something defined in it before the rest of them will work ::).

Colin