Rearranger: incorrect rearrangement?
I want to rearrange this simple class:
with the attached settings and I get
instead of the expected
Attachment(s):
rearranger.xml
Please sign in to leave a comment.
I want to rearrange this simple class:
with the attached settings and I get
instead of the expected
Please sign in to leave a comment.
The problem is that your rule #14 ("All methods") is being matched before rule #20 ("private methods") so both paintGearLevel() and paint() match that rule. You need to set the priority of rules like #20 higher than that of #14, so that private methods will indeed match the more specific rule.
I suggest you set priority of rules 15, 17, 18 and 20 to 2. Leave rule #14 at priority 1.
-Dave
Thanks. But how do I change the priority?
Tom
There are three columns on the Class Member Order pane: sequence number, priority, and rule description. Click on the priority (it will be a "1" for all rules by default, except "n/a" for comment rules). It's just a text field that accepts integers greater than zero.
You can also sort the table by priority (or sequence number) by clicking on the corresponding table column header.
-Dave
Hmm, rule #14 is "implemented methods", but a private method never can
be an implementation method. Or don't I understand "implemented methods"
correct?
Tom
BTW, I had the same problems with a public method, which does not
implements an abstract method (no IDEA gutter icon at all), and also is
caught by the "implementing methods" rule.
Tom
Tom,
Sorry, I must have used an old version of the plugin to load and inspect your configuration file. Rule 14 is indeed "Implementing methods," not "public methods" as the earlier version of the plugin showed me. So ignore what I said. It's a real bug, I'm able to reproduce it, and I'll get to work on it.
-Dave
Tom,
please give version 3.5 a try. I corrected a rule matching bug for implemented/ing methods.
-Dave
Thanks, works fine now :)
Tom