소스코드 입력 후 자동 정렬 [Ctrl + Shift + F] 을 누르면 이클립스에서 자동으로 설정되어 있는 값을 기준으로 줄바꿈을 합니다.
이는 오히려 가독성에 문제가 되는 경우가 있어 기본값을 재설정 해주어 문제를 해결할 수 있습니다.
[설정방법 목차]
1.Java
2.CSS
3.HTML
4.XML
1.Java
1) Preferences > Java > Code Style > Formatter > New... 클릭
2) Profile name 입력 > OK 클릭
3) Indentation > Tab policy > Spaces only 선택 > Indentation & Tab size 4 선택
4) Line Wrapping > Maximum line width 120 설정
5) OK 클릭
2.CSS
1) Preferences > Web > CSS Files > Editor
2) Formatting > Line width : 120 설정
3) Formatting > Indent using spaces 클릭
4) Formatting > Indentation size : 4 설정
5) Apply and Close 클릭
3.HTML
1) Preferences > Web > HTML Files > Editor
2) Formatting > Line width : 120 설정
3) Formatting > Indent using spaces 클릭
4) Formatting > Indentation size : 4 설정
5) Apply and Close 클릭
4.XML
1) Preferences > XML > XML Files > Editor
2) Formatting > Line width : 120 설정
3) Formatting > Indent using spaces 클릭
4) Formatting > Indentation size : 4 설정
5) Apply and Close 클릭
'Eclipse' 카테고리의 다른 글
[Eclipse] clean, build, publish 차이점 (0) | 2022.08.02 |
---|---|
[Eclipse] Code Template 등록 및 실행 방법 (0) | 2020.08.18 |