Custom setters?

Is there a way to customize the setters that are generated? I'm hand coding propertyChangeSupport into my domain objects and have to think there is a better way.

Thanks.

3 comments
Comment actions Permalink

Jose Gulisano wrote:

Is there a way to customize the setters that are generated? I'm hand coding propertyChangeSupport into my domain objects and have to think there is a better way.

Thanks.

Unfortunately not. It's a feature for which I've been meaning to write
a plugin for a long time. I generally use live templates for now.

N.

0
Comment actions Permalink

Jose Gulisano wrote:

Is there a way to customize the setters that are generated? I'm hand coding propertyChangeSupport into my domain objects and have to think there is a better way.

Thanks.

Vote here : http://www.jetbrains.net/jira/browse/IDEADEV-10999

0
Comment actions Permalink

What I did for a similar situation was to create my a Live Template that generated the getter and setter. I used a Template variable to suggest property and the property type:

Template


Variables:


I set this to a live template abbreviation. When I activated the template, I get a nice pop-up list of all my properties (as well as other variables) to choose from. Perhaps you could use a similar approach. It at least reduces the amount of redundant code you need to type.

0

Please sign in to leave a comment.