Rules for arrangement methods by name Follow
Hello there, I try to arrange methods in following order:
- onAttach(Activity)
- onCreate(Bundle)
- onCreateView(LayoutInflater, ViewGroup, Bundle)
- onActivityCreated(Bundle)
- onViewStateRestored(Bundle)
onStart()
etc.
But I don't know what rules should I apply to achive this. I tried following patterns onAttach, onAttach.*, .*onAttach.* and nothing helps. Thats why any help would be appreceated.
Please sign in to leave a comment.
Hi, Dmitry!

I've used settings from above and probably get the result you want. Maybe it also helps for you!
Thank you, Yaroslav, I tried this ordering, but then onCreateView is placed after onPause instead of onCreate.
Try to add "method" rule as a last rule. If it doesn't work, please provide source code you were arranging (if possible)
I already had this last rule you can see it here

, and for example this code after auto arrangement:
Yes, it's clear that first method (newInstance) should be located somewhere at the end of file.
Dmitry, what idea build are you using?
I was not able to reproduce it on the latest build. Please check them on http://confluence.jetbrains.com/display/IDEADEV/IDEA+14+EAP
If you are will be able to reproduce it on the latest build, please fill request in our issue tracker https://youtrack.jetbrains.com/issues/IDEA
Thank you, Yaroslav. I found out that I missed rule for public method.