AI ์ด์ „์‹œ๋Œ€ (↓์„๊ธฐ์‹œ๋Œ€ IT)/01. Java

eclipse coding style

๐Ÿ“ฆ DonzBox 2018. 10. 1. 16:29


ํŒ€์›๋‹˜๋“ค์ด ์ดํด๋ฆฝ์Šค๋กœ ๊ฐœ๋ฐœ์„ ์‹œ์ž‘ํ•œ๋‹ค๋ฉด ๋‹คํ•จ๊ป˜ ์ดํ•˜์™€ ๊ฐ™์ด ์„ค์ •์„ ํ•˜๊ณ  ์‹œ์ž‘ํ•˜์ž, ์ œ๋ฐœ์š”


* ์ฒดํฌ ์™ธ์— ๋‚˜๋จธ์ง„ ์ฒดํฌํ•ด์ œ

โ–  Windows -> Prefrences > Java > Editor > Save Actions

    โˆš Perform the selected actions on save

    โˆš Organize imports

    โˆš Additional actions


โ–  Configure ํด๋ฆญ

  โ–ถ Code Organizing ํƒญ

    โˆš Remove trailing whitespace

    โˆš Correct identation

  โ–ถ Code Style ํƒญ

    โˆš Use blocks in if/while/for/do statements (๋‹จ์ผ if ๋ฌธ์— ๊ฐ•์ œ block ์ƒ์„ฑ)

    โˆš Use modifier 'final' where possible

     - โˆš Parameter (Private fields, Local variables is uncheck)

  โ–ถ Unnecessary Code ํƒญ

    โˆš Remove unused imports

    โˆš Remove unnecessary casts

    โˆš Remove redundant type arguments (1.7 or higher)

   

์„ค์ •ํŒŒ์ผ ๋งํฌ :  org.eclipse.jdt.ui.prefs

ํ•ด๋‹น ํŒŒ์ผ์„ <workspace ํด๋”>\.metadata\.plugins\org.eclipse.core.runtime\.settings\  ์— ๋ณต์‚ฌ(๋ฎ์–ด์“ฐ๊ธฐ)