Android win7系统,Eclipse编写代码时,在sourceInsight中查看出现对不齐的有关问题

Android win7系统,Eclipse编写代码时,在sourceInsight中查看出现对不齐的问题

win7系统,Eclipse编写代码时,在sourceInsight中查看出现对不齐的问题:

用空格键代替tab键,步骤如下:

Step 1:
Windows->Preferences->General->Editors->Text Editors,选中“Insert spaces for tabs”。


Step 2:
Windows->Preferences->Java->Code Styles->Formatter,点击Acitivie Profile边上的Edit按钮。在打开的页面中的General settings中,令Tab policy为Space only。

以上两步即可


Eclipse工作区设置默认编辑宽度

1)打开Window  => Preferences窗口


2)打开Formatter属性页从Java => CodeStyle => Formatter


3) 单击New创建一个自己的Formatter


4)选择Line Wrapping属性页,并设置Maximum line width 为120


5)然后一路OK就可以了