Book a Demo

Author Topic: class creation date, and class modification date  (Read 3755 times)

Angst

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
class creation date, and class modification date
« on: September 20, 2010, 02:21:04 pm »
hi,

I am working on Model Transformation, and Code Geneation. I don't know how can I genereate a class with header like below

/****************************************************
 *  %fileName%                                        
 *  Created on: %class creation date in PIM (not PSM)%                      
 *  Last Modified on: %class modification date in PIM (not PSM)%                      
 *  Implementation of the %elemType% %className%      
%if classAuthor != ""%
 *  Original author: %classAuthor%                    
%endIf%
 ****************************************************/

EA version: 7.5

Any help will be very appreciate

Regards,
Hung Tran
« Last Edit: September 20, 2010, 02:23:41 pm by tdhung80 »

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: class creation date, and class modification da
« Reply #1 on: September 20, 2010, 04:21:51 pm »
I would generate the creation and modification dates from the PIM class into a tagged value on the PSM class, then use those tagged values.

Angst

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: class creation date, and class modification da
« Reply #2 on: September 21, 2010, 01:21:23 pm »
I see what you mean, but i cannot find variables which represent for class creation date, and class modication date in Model Transformation.

What are they?

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: class creation date, and class modification da
« Reply #3 on: September 21, 2010, 01:50:32 pm »
Tag { name="created"  value=%qt%%classCreated%%qt%  }
Tag { name="modified" value=%qt%%classModified%%qt% }

Angst

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: class creation date, and class modification da
« Reply #4 on: September 21, 2010, 07:27:48 pm »
I have tried them, but they are not working. classCreated, and classModified are also not highlighted by the tool.

At Class template,

%elemType%
{
  %TRANSFORM_REFERENCE("Class")%
  %TRANSFORM_CURRENT("language")%
  Tag{name="created" value=%qt%%classCreated%%qt%  }
  Tag{name="modified" value=%qt%%classModified%%qt% }
  language="C#"
  ....
}

Here is output

Class
{
  XRef{namespace="C#" name="Class" source="{349EF7BF-F0D2-4808-A307-80F6ADDD16EA}"}
  complexity="1"
  status="Implemented"
  concurrency=""
  stereotype="interface"
  visibility=""
  persistence="Transient"
  arguments=""
  phase="1.0"
  cardinality=""
  multiplicity=""
  notes=""
  alias=""
  author="Hung Tran"
  name="Button"
  scope="Public"
  version="1.0"
  Tag{name="created" value=""  }
  Tag{name="modified" value="" }
  language="C#"
}

it seems it does not work in EA 7.5, isn't it? :'(