Book a Demo

Author Topic: stereotypes and code engineering  (Read 2700 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
stereotypes and code engineering
« on: May 19, 2005, 08:30:47 am »
I've been playing around with code engineering over the last couple of days.  I say playing around since how anybody can actually use EA to do any round trip engineering is currently beyond me! ::) ???  :'(

When using code engineering, I was generating bug reports at the rate of 1 every 4 minutes today (not all day!  I had to do other things - my hands were getting RSI (repetitive strain injury) from typing up the reports!)  All I do is generate something and then try to reverse it...  It almost always doesn't... >:(  I've given up reporting till tomorrow...

Anyhow I've managed to get something going that will do for the present (perhaps until tomorrow). :(

However, I have one big problem...  How do I preserve stereotypes through RTE (round trip engineering).

In order to get around the defective code generator/reverser, I've resorted to using stereotyped overrides on the class declaration and body code generation templates.  However, since the stereotype is not passed to the code (that I can see), when I reverse, the stereotype I applied is "helpfully" removed by the reversal process.

[size=13]SPARXIANS - this is THINKING 101!!![/size]  If you don't propagate the stereotype you don't have the right to remove the stereotype I've applied.  I'm the blooming modeller, not EA!  If (as part of your hard-coded engine), you map certain language structures to predefined stereotypes (such as, enum->enumeration - for C#) then do it, but otherwise leave any other model stereotype alone!

Does anyone know how to get around this problem?

It may have occurred to some of you that I'm a bit more pissed off than usual...   >:(  You'd be right!!! ::)  It's 11:30pm and I've had a long, very frustrating, day...  Off to bed...

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

benc

  • EA Administrator
  • EA User
  • *****
  • Posts: 200
  • Karma: +0/-0
    • View Profile
Re: stereotypes and code engineering
« Reply #1 on: May 19, 2005, 10:26:16 pm »
Hello Paolo,

You're right - EA shouldn't clobber the stereotypes it doesn't know anything about, which is why this problem will be resolved in the next release. So <<struct>>, <<enumeration>> etc will still be cleared if necessary, but not custom stereotypes.

Although, we've had to add a couple of extra terms to our blacklist since your last post ;) , we appreciate your feedback as always and will address the problems where possible.

Thanks again.

Regards,
Ben