1.点击 window->preference-,选择 General->Editors->Text Editors,勾选右侧的“insert space for tabs”,保存;
2.点击 window->preference-,选择 java->code style ->formatter;点击new profile新建样式,在profile name处键入名字,点击ok;
3.点击右侧的editor,选则 tab policy的值为刚才新建的样式,点击确定,保存。
本文介绍如何在Eclipse中设置代码格式,包括使用空格代替制表符、创建新的代码样式配置文件,并将新建的样式应用到编辑器的制表策略中。
1.点击 window->preference-,选择 General->Editors->Text Editors,勾选右侧的“insert space for tabs”,保存;
2.点击 window->preference-,选择 java->code style ->formatter;点击new profile新建样式,在profile name处键入名字,点击ok;
3.点击右侧的editor,选则 tab policy的值为刚才新建的样式,点击确定,保存。

被折叠的 条评论
为什么被折叠?