GenerateToString impossible if the class has no properties.

Hi,

If a class has no properties it is impossible to generate toString()-Method with GenerateToString-Plugin because the button "Ok" in the plugin-popup is disabled.
Is there a solution for this problem (without adding fake-properties ) ?

2 comments
Comment actions Permalink

Hello Assen,

What exactly do you want to be generated? Why don't you simply press Ctrl-O
and select toString() in the override dialog?

If a class has no properties it is impossible to generate
toString()-Method with GenerateToString-Plugin because the button "Ok"
in the plugin-popup is disabled.

Is there a solution for this problem (without adding fake-properties
) ?

---
Original message URL:
http://www.jetbrains.net/devnet/message/5244626#5244626

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

Hi Dmitry,

Ok, this works, but this is not what I want, because then I can not use my Velocity-toString-Template.
I set up my own Velocity-toString-Template in GenerateToString-Settings, try to generate toString with ALT+INS -> toString() and fail because the OK button is disabled if the class has no class-fields.
That is, I want to have self defined toString-Template and use it with GenerateToString-Plugin, but it is impossible because of disabled OK-button (see screenshot)


generatetostring-popup.JPG

0

Please sign in to leave a comment.