Book a Demo

Author Topic: Assign language to Package  (Read 4672 times)

DanG83616

  • EA User
  • **
  • Posts: 180
  • Karma: +0/-0
    • View Profile
Assign language to Package
« on: April 16, 2013, 10:04:10 am »
I am generating PSMs for both IDL and C++. I need Package to map according to language so that when I gen code for each PSM I get module or namespace, respectively. Unfortunately, the Package objects do not have a language property. My workaround is to remember to set Default language for Code Generation appropriately before performing the transformation. I suppose I could create a script to fix it when I forget. Is there a more convenient way?

TIA,
Dan

Makulik

  • EA User
  • **
  • Posts: 400
  • Karma: +0/-0
    • View Profile
Re: Assign language to Package
« Reply #1 on: April 17, 2013, 01:42:16 am »
Hi Dan,

Couldn't find a different way to do this either. The only thing I know (if this wasn't changed in Version 10 meanwhile), that the 'Language' attribute of Packages or Classes isn't even supported by EA's internal transformation language.

Best regards,
Günther

DanG83616

  • EA User
  • **
  • Posts: 180
  • Karma: +0/-0
    • View Profile
Re: Assign language to Package
« Reply #2 on: April 17, 2013, 02:39:04 am »
Thanks, Günther. The language attribute is supported for Class but not Package. See the Special Cases subsection of the Objects topic in the Write Transformations section of the User Guide. It makes no sense because the language attribute is used to select elements for the M2T transformations. It is unnecessarily awkward to use the  same PIM to generate two complementary PSMs for the same system.

FWIW, I made a feature request.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Assign language to Package
« Reply #3 on: April 17, 2013, 11:29:32 am »
What are you trying to use it for? EA never uses the language property of a package.

DanG83616

  • EA User
  • **
  • Posts: 180
  • Karma: +0/-0
    • View Profile
Re: Assign language to Package
« Reply #4 on: April 17, 2013, 11:49:47 am »
Now that you say that, I must have gotten confused. I thought that the code generator was skipping the packages that had the wrong language. For example, if I used the C++ template on a Package with language="IDL" I thought it was skipping the code gen was skipping the folder. I just tried again and, as you say, Package language doesn't seem to affect anything code gen.

Operator error. :-[

Thanks for checking.

Dan