本文介绍了Intellij-IDEA:如何按字母顺序对成员进行排序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我正在使用Intellij-IDEA12。大多数队友都使用Eclipse,并且在保存时会先根据可见性自动排序成员,然后按字母顺序对其进行排序。我想模仿Intellij中的相同功能。但是似乎当我选择按字母顺序排列成员时,它会覆盖可见性(和所有其他)规则。如何根据可见性(公共-默认-私有)对成员进行排序,并在该子组中按字母顺序对它们进行排序?I am using Intellij-IDEA 12. Most of team mates use Eclipse and while saving it sorts members automatically first based on Visibility and then Alphabetically. I want to mimic the same functionality in Intellij. But it seems that when I choose arrange members alphabetically, it overrides visibility (and all other) rules. How can I sort members based on Visibility (Public - Default - Private ) and within that sub-group sort them Alphabetically?编辑:在问题中做出的这个假设是错误的。就像@Maba在Answer中提到的那样,创建单独的行并将其标记为按字母顺序排列可以按预期工作。 (我为字段使用了单独的行,但未能为方法创建单独的行,因此造成混乱。) This assumption made in the question is wrong. Like mentioned in the Answer by @Maba, creating separate rows and marking them as "Order Alphabetically" works as expected. ( I had separate rows for fields but failed to create separate rows for Methods and hence the confusion.)推荐答案为以下内容创建单独的行代码样式的 Arrangement 部分中的不同方法可见性。Create separate rows for the different method visibilities in the Arrangement part of the Code Style. 这篇关于Intellij-IDEA:如何按字母顺序对成员进行排序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-19 11:41