Rearranger: getters/setters

Hi Dave,

How do I pair getter and setter (getA(), setA(A), getB(), setB(B) instead of getA(), getB(), setA(A), setB(B))? The option "Keep getters/setters together" seems not to do it.

Also, some of the setters are not considered as setters, e.g.:


1 comment
Comment actions Permalink

Hi Tom,

Your configuration file indicates that the "Keep getters/setters together" option is not set. Did you just turn it off for testing and send me a copy at that point? Please ensure that it is enabled.

The other problem (some setters not considered as setters) is due to the fact that when you created the rules, the default definition of getter/setter was copied into the rule at that time. So even though you changed the definition globally to be less strict, the method rules (already created) have the old, stricter definition.

I want to change this behavior so that rules inherit the global default behavior unless specifically overridden. However, in the meantime, you will have to go to each method rule definition and change its own specific getter/setter definition. Sorry, I know this is bad UI.

Let me know if that helps, though.



Please sign in to leave a comment.