Utility app to create get / setters in a class to be copied an pasted.
Enter a list of variable names and their corresponding types and click Create.
Global declarations will be generated with the specified prefix, along the get /set methods. You can copy the Global declarations, or the methods to the clipboard to paste into your class, or you can copy a new class definition to the clipboard to paste if you are creating a new class.
You can also paste an existing type definition into the Type field to migrate it to a class.
In the class definition, an initialize call will be created for any List or Map type variables. You can add an initialize for any other types you like by adding them to the ToInitialize List at the top of the tfType_Action sub.
Depends on:
I hope this saves you some time
Update to V0.2
The Type_Validated tab uses a modified version of Erels MiniSearchView to validate entries against a stored list.
You will be prompted to add types that are not on the list. To add a type that has less characters than an existing matched one, press the Escape key to dismiss the list, then press return. To delete an entry, type the first few characters to get it in the list, then right click on the list entry.
14
Enter a list of variable names and their corresponding types and click Create.
Global declarations will be generated with the specified prefix, along the get /set methods. You can copy the Global declarations, or the methods to the clipboard to paste into your class, or you can copy a new class definition to the clipboard to paste if you are creating a new class.
You can also paste an existing type definition into the Type field to migrate it to a class.
In the class definition, an initialize call will be created for any List or Map type variables. You can add an initialize for any other types you like by adding them to the ToInitialize List at the top of the tfType_Action sub.
Depends on:
- jKeyEvent (Project and Libs download below).
- Reflection https://www.b4x.com/android/forum/threads/jreflection-library.35448/
- CSSUtils
- jRandomAccessFile
- jReflection
- jSQL
- jXUI
I hope this saves you some time
Update to V0.2
- Allow pasting of preformatted variable definitions (into the Var Name field) as per post #9. Types and Const are excluded, multiple variables on one line are allowed. Does not deal with multiple assignments, i.e. Private PUX = 200, PUY= 200,PUWidth = 200, PUHeight = 200 As Double
- Allow multi input on one line parsed : B,C,D,E
- Allow multiple assignments on one line in name input (pasted and typed)
- Replaced context menu and capture paste
- Check for initialize requred for List and Maps on all input not just Types
- Added generated Initialize code for List and Map types
- Deals with assignments at the end of pasted or entered VarType
- Basic format pattern check on vartypes in Unvalidated tab : Matches Type(String) or Type(String) = String or Type(String) = "String"
- Added validated Tab, VarTypes must be in the validation list, which can be added to via prompt if it doesn't already exist.
- Added readonly to unvalidated tab which is still required to allow assignments.
The Type_Validated tab uses a modified version of Erels MiniSearchView to validate entries against a stored list.
You will be prompted to add types that are not on the list. To add a type that has less characters than an existing matched one, press the Escape key to dismiss the list, then press return. To delete an entry, type the first few characters to get it in the list, then right click on the list entry.
14
Attachments
Last edited: