设置步骤:窗口(windows)->首选项(preferences...), 在左边选Java->代码样式(code style)->格式化程序(Formatter), 右边点“显示(show)”按钮,选“缩进(Indentation)”选项卡, 在“常规设置(general settings)”里的“跳格策略(Tab policy)” 下拉列表选“仅空格(Spaces only)” 。