如何更改自动生成代码的 Eclipse 缩进样式?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2891782/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to change Eclipse indentation style for automatically generated code?
提问by AndrejaKo
Is there any way to change indentation style for automatically generated code in Eclipse? I'd like to change from
有什么方法可以更改 Eclipse 中自动生成的代码的缩进样式?我想从
class Test {
blah blah
}
to
到
class Test
{
blah blah
}
回答by VonC
If you do change the format of the brace, all new class will be generated according to that new format:
如果您确实更改了大括号的格式,则所有新类都将根据该新格式生成:
回答by Ted Spence
It's in "Window | Preferences" in the latest eclipse.
它在最新 eclipse 的“Window | Preferences”中。