Book a Demo

Author Topic: edit getters/setters code generation  (Read 3954 times)

Q-Man

  • Guest
edit getters/setters code generation
« on: June 01, 2007, 06:30:04 am »
hi,

can you tell where the getter/setter code generation is defined and editable?

i want to edit the way actionscript getters/setters are created.

when i have a property "name" in a class ea creates "get getName()". i want to make it create "get name()" or "getName()". is that possible?

Q-Man
« Last Edit: June 01, 2007, 07:42:15 am by Q-Man »

thomaskilian

  • Guest
Re: edit getters/setters code generation
« Reply #1 on: June 01, 2007, 10:12:19 am »
Just a guess: look into Tools/Options/Code Gen/Actionscript. If you can't find it there you need to modify the code gen templates (Setting/Code Gen)

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: edit getters/setters code generation
« Reply #2 on: June 01, 2007, 10:40:59 am »
Also look at the options page for Actionscript. Make sure you've chosen the correct version.
No, you can't have it!

Q-Man

  • Guest
Re: edit getters/setters code generation
« Reply #3 on: June 04, 2007, 03:00:51 am »
Quote
Just a guess: look into Tools/Options/Code Gen/Actionscript. If you can't find it there you need to modify the code gen templates (Setting/Code Gen)


I want to modify the templates, but I can't find the part where the getters/setters are defined. Can you help me with that?

Q-Man

  • Guest
Re: edit getters/setters code generation
« Reply #4 on: June 04, 2007, 04:22:21 am »
I found out that the getter/setter code generation is using the normal "operation" templates. but the "operation declaration" template is not used and somehow overwritten by any special declaration. Does anyone know where this special kind of declaration is defined?

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: edit getters/setters code generation
« Reply #5 on: June 04, 2007, 03:23:31 pm »
The operation declaration template will have a stereotype override, which can be found under the template list.

Q-Man

  • Guest
Re: edit getters/setters code generation
« Reply #6 on: June 05, 2007, 11:10:31 pm »
Thank you, I did'nt recognize the steoreotype overwrites. Now I got it.