Eclipse选项卡的宽度不变 [英] Eclipse tab width not changing

查看:58
本文介绍了Eclipse选项卡的宽度不变的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我浏览了几篇与此相关的文章,但它们似乎并不能帮助我解决我的问题.我有一个项目,其中java文件以2个空格的宽度缩进.我想将所有内容更改为4个空格的宽度.我尝试了正确的缩进"选项,但是当我将几行修改为4个空格的缩进时,它会将所有内容移回2个空格的宽度.我检查了Java->代码样式->格式化程序中的设置,默认为4个空格的宽度.我还在常规"->编辑器"->文本编辑器"中检查了设置,并将它们设置为4空格制表符宽度.

I've looked through a couple of posts related to this but they don't seem to help me solve my problem. I have a project where the java files are indented with a 2-space width. I would like to change everything to 4-space width. I tried the "correct indentation" option but it just moves everything back to a 2-space width when I modify a few lines to 4-space indentation. I've checked settings in Java->Code Style->Formatter and the default is 4-space width. I've also checked settings at General->Editors->Text Editors and they are set to 4-space tab width.

我认为正确的缩进可能是在读取整个java文件并更正了代码,以便它与文件中的其他所有内容一致,因此我手动修改了每一行以使其具有4个空格的缩进.自动更正缩进仍会将所有内容恢复为2个空格.有人遇到过这个问题吗?还有其他设置可以更改吗?

I thought the correct indentation may have been reading the whole java file and correcting the code so it conforms to everything else in the file, so I manually modified every line to have 4-space width indentation. Autocorrect indentation still takes everything back to 2 spaces. Has anyone had this problem before? Is there another setting to change?

推荐答案

我找到了解决方案.特定于项目的设置的缩进宽度设置为2,而不是4.这些设置必须已覆盖了蚀设置.

I found the solution. The project-specific settings had the indentation width set to 2, not 4. These settings must have overridden the eclipse settings.

这篇关于Eclipse选项卡的宽度不变的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆