source code generation:option generate getter/setter and constructor (#1594)

a properly defined class requires at least one constructor, and usually a gettor and setter by attribute

it is therefore normal that the generated code generates them too (which is not the case for now .....)

it is therefore necessary that these three elements be proposed during the generation of the source code

Created
8 April 2019 21:49:01
Closed
29 January 2020 20:43:35
Requested by
fr016
State
Solved
Version
11.97
OperatingSystem
windows 10 x64
Solved in
12

Dusan Rodina - softwareideas.net 9 April 2019 21:22:50

Support for generation of constructors will be added soon. Getters and setters may be added in two ways:

1) Add «property» stereotype to an attribute

2) Right click on an attribute and choose Add Getter and Setter - it will add the getter and setter operation to your class

fr016 14 April 2019 21:18:07

okay

one more thing

the current generation of getter and setter starts with a capital letter which is not the case in practice

here a correct sample in Java:

https://www.w3schools.com/java/java_encapsulation.asp

this is also the case in many languages such as C# or php

would it be possible to correct that too?

thank you

Dusan Rodina - softwareideas.net 14 April 2019 22:23:23

Actually, Pascal Case (the first letter capital) is used for method names in C# and VB.NET. So this feature will have to be made language specific. It will be implemented in one of next versions.

fr016 16 April 2019 16:55:00

Ok thx

TrackedRequestComment
Your Name:
You can use these formatting tags: [b]bold[/b] [i]italic[/i] [u]underline[/u] [url]www.example.com[/url] [code]some code[/code] [quote]quoted text[/quote] [list]one list item per line[/list]