Modifiers order

Answered

Hello, is there a way to customize the modifiers 's order ?

Particularly the static modifier, because i always place this modifier in first position, but if, for instance, i use the 'make public' intention static is placed after public.

 

0
4 comments

Hi,

please change the order at

File | Settings | Editor | Code Style | Java | Arrangement

Thanks,

Anna

0

I have never understood the arrangements, even after have reading the doc, it seems that you can only order the declarations but not the modifiers inside these declarations.

In a rule the public/private modifiers are always placed before static/final (themselves before transient/volatile), even if static is selected before.

0

It doesn't seem possible to make static modifier go first when generating the code. Note that this is not canonical preferred order (as stated in the Java Language Specification). If you feel this feature would be useful, please file a request at https://youtrack.jetbrains.com/issues/IDEA

0

I have posted an issue, thanks.

0

Please sign in to leave a comment.