简体   繁体   English

如何避免Intellij安排我的静态方法?

[英]How to I keep Intellij from arranging my static methods?

I want to use Intellij to reformat code (whitespace) but without moving my methods. 我想使用Intellij重新格式化代码(空格),但不移动我的方法。

How do I disable this? 如何禁用此功能? I tried unchecking everything in Settings-> Editor-> CodeStyle-> Java ->Rearrange , as follows, but still, all static methods are moved to the end. 我尝试取消选中Settings-> Editor-> CodeStyle-> Java-> Rearrange中的所有内容,如下所示,但是仍然将所有静态方法移到最后。

设置

You can configure rearrangement behavior in Reformat Code dialog ( Ctrl+Shift+Alt+L shortcut). 您可以在“ Reformat Code对话框中配置重新排列行为( Ctrl + Shift + Alt + L快捷键)。

Once dialog open, enable/disable Rearrange code checkbox. 对话框打开后,启用/禁用Rearrange code复选框。 If enabled, your source code entries should be redordered according to the configurations specified in the Arrangement tab of your Code Style settings. 如果启用,则应根据Code Style设置的“ Arrangement选项卡中指定的配置对源代码条目进行重新排序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM