Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/338.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/eclipse/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/ant/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 是否撤消Eclipse中的换行效果?_Java_Eclipse - Fatal编程技术网

Java 是否撤消Eclipse中的换行效果?

Java 是否撤消Eclipse中的换行效果?,java,eclipse,Java,Eclipse,我不小心格式化了我的代码,几乎每一行都被一步一步地打断了。我想撤消这些更改。是否有任何解决方案: 我以前的代码: capsCacheDir = new File(mService.getCacheDir(),"entity-caps-cache"); 搜索代码: capsCacheDir = new File(mService.getCacheDir(), "entity-caps-cache"); Ctrl+z或如果已保存文件,请转到: Wi

我不小心格式化了我的代码,几乎每一行都被一步一步地打断了。我想撤消这些更改。是否有任何解决方案:

我以前的代码:

capsCacheDir = new File(mService.getCacheDir(),"entity-caps-cache");
搜索代码:

capsCacheDir = new File(mService.getCacheDir(),
                        "entity-caps-cache");

Ctrl+z或如果已保存文件,请转到: Windows->Preferences->Java->Code Style->Formatter在那里您可以调整格式化程序规则

以下是有关更多帮助的链接:

您可以随时根据自己的喜好调整自动格式化规则,然后重新格式化。现在无法查看它是哪条规则,但我非常确定有一条。Crtl+Z-如果太晚了,您可以尝试在scmgit、mercurial、svn中提交或最后提交。。。如果你用的话。我也会根据你的喜好调整格式化规则,然后再重新格式化。编辑轮廓并转到“换行”选项卡。如果你根本不想换行的话,有一个条目的最大线宽可以满足你的需要,将它设置为一个相当高的值。你可以调整大量的规则:D@AliAnsari当前位置如果我的回答对你有帮助,请接受。