简体   繁体   English

如何在 eclipse java 中禁用“自动更正”

[英]how do disable “auto correct” in eclipse java

when i try to write a new variable, String for example, it auto select a name with the variable type.当我尝试编写一个新变量时,例如字符串,它会自动 select 使用变量类型命名。 for example:例如:

String str="hello world"

instead:反而:

String strString="hello world"

Simplest way is to press Esc before you press Space .最简单的方法是在按Space之前按Esc

If you want to turn off from settings:如果要从设置中关闭:

Window->Preferences->Java->Editor ->Content Assist-> Advanced On top box uncheck: "Java Non-Type Proposals", "Java Proposals" and "Java Proposals (Task-Focused)". Window->Preferences->Java->Editor->Content Assist-> Advanced 在顶部框取消选中:“Java Non-Type Proposals”、“Java Proposals”和“Java Proposals (Task-Focused)”。

Generally its good practice to postfix datatype at the end of each variable.通常,在每个变量的末尾添加后缀数据类型是一种很好的做法。 Personally I follow this approach.我个人遵循这种方法。 You may also rethink before turning off this feature.您也可以在关闭此功能之前重新考虑。

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

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