Jump to content
r_amse_s

automatische Generierung von properties in GExpert

Recommended Posts

Hallo,

 

weisst jemand wie kann ich mithilfe von GExpert in einer Klasse zB für 15 locale variablen automatisch properties dafür generieren.

Geter und Seter muss nicht unbedingt sein, das kann die IDE auch.

Ich finde leider nichts dafür in der Doku, bilde mir ein dass ich schon mal so etwas im GExpert verwendet habe

 

danke!

Share this post


Link to post

I am not aware of such a functionality in GExperts (but it might be in MMX or in cnpack).

 

But I have a keyboard macro for that purpose, which I use like this:

  1. declare the fields
  2. copy the field declaration to the public (or published) section of the class
  3. put the cursor at the beginning of the first field
  4. execute the macro
  5. execute the macro again until all fields have been converted to properties

The macro is a recording of key strokes that changes the field declaration to a property declaration and at the end moves the cursor to the at the beginning of the next field declaration. See attached file. You can load it in the Keyboard Macro Manager.

ReadWriteproperty.gxm

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×