How to specify the order of class members when formatting in Eclipse

前端 未结 3 425
太阳男子
太阳男子 2020-12-10 09:06

In Eclipse IDE how do you customize the Java code style formatter to have it sort the class members with a specified order, for example to group all instance methods by visi

3条回答
  •  清歌不尽
    2020-12-10 09:35

    If the question is, "how do you customize the 'Source -> Format' command to re-order members?", I don't think it can be done. To change the order used for the 'Source -> Sort Members' command, change the "Members Sort Order" preference: "Window -> Preferences -> Java -> Appearance -> Members Sort Order"

提交回复
热议问题