2

In my code generator, I saw the default visibility is public, so all methods generated is public, although I customized myself template of setter. enter image description here

My template: enter image description here Now, I need public getter and protected setter. How can I do?

Supun Wijerathne
  • 11,964
  • 10
  • 61
  • 87
MapleTree
  • 41
  • 7

1 Answers1

3

You just can't, I'm afraid.

Like the text at the bottom of IDEA's "Customize Template" dialog says:

"Visibility is applied according to File | Settings | Editor | Code Style | Java | Code Generation".

That setting does not distinguish between getters and setters, unfortunately.

You can always create a feature request at https://youtrack.jetbrains.com/

eekboom
  • 5,551
  • 1
  • 30
  • 39