Arrange code based on field type.

Answered

I maybe missing some point but here it goes.

 

I've looked at the Arrangement options in the Code Style area.

 

I know I can rearrange field by name so private int fieldA comes before private boolean fieldB. I would like to know if it is possible to rearrange fields first by field type and then by field name. Something like:

private Car newCar;
private boolean isTypeInvalid;
private int averageOptionA;
private Car oldCar;
private boolean isTypeValid;
private int averageOptionB;

would become:

private boolean isTypeInvalid;
private boolean isTypeValid;
private Car newCar;
private Car oldCar;
private int averageOptionA;
private int averageOptionB;

 

Thanks.

 

 

 

1 comment
Comment actions Permalink
Official comment

It's not possible at the moment, feature request would be appreciated at https://youtrack.jetbrains.com/issues/IDEA . Thank you.

Please sign in to leave a comment.