ã©ããã¦ããªã·ã´ãã§ã¯åºå®ã§Eclipseããã使ããã¨ãå¤ãããããªããªãä»ã®IDEããã«æãåºãã¥ããã®ãæ©ã¿ã®ç¨®ã ã£ããããä»æ¥ãã®é ãä»æ¥ãã®é ã¨è¨ãã¤ã¤ããæ°å¹´ãæ£ç´Eclipseããã§å°ã£ã¦ãªãã£ã¦ã®ãããã¾ããã
ããããGroovyãããEclipseããããã´ãã§ã´ãã§ãã¦ãã¨ããã¾ã«ä¸æ©å«ã«ãªã£ã¦ãã£ã½åããããã¦èãããã¾ãã¡ã¤ã±ã¦ãªãã¦ãIntelliJ IDEAããã®ãåãåããã°ãªããããªã¼ã¨æãã¯ããã次第ã§ãã
ãã¦æ²é¡ã®è©±ã¯æ¢åºãããæãå ¬å¼ã«ããããããã ããæ¥æ¬èªè¨³ãã¦ããã¦ãæ¹ãããã
ã§ããããªãã ãè¨å®ã¨ãã大äºãªãã ãã©ãç§ã«ã¨ã£ã¦ã¯å¿«é©ã«ã³ã¼ããæ¸ããããéè¦ãªãã§ãããEclipseãããã§ãã¦ãã¢ã¬ãIntelliJ IDEAããã¯ã§ããã¼ã®ã¼ï¼ã¤ãããã¼ãã¨ãè¨ã£ã¦ãããåºæ¥ããã¨ã ã£ãã失礼ãªã話ã
ãã¨ããªãã¹ãããã©ã«ãã®ã·ã§ã¼ãã«ãããã¼ã§è¡ãããã§ããEclipseãããã³ã°ã«ããã°ãã£ã¨ãããªãè¡ããã®ããããã¾ããããããããªãã¨ãªãããã©ã«ãã§ããããã¯ã©ã¹ã¿ã
空æ°èªã
ä½ãå°ã£ãæã«ä½ãããã®ãã¨ããã¦ããã空æ°èªãæ©è½ãEclipseã§ã¯å¤ç¨ãã¾ããIntelliJ IDEAã§ããããªãã«ä½ã¨ããã¦ããã¾ããæªå®ç¾©ã®ã¡ã½ãããã¯ã©ã¹åãæ¸ããå¾ããã®ã¹ã¿ããä½ã£ã¦æ¬²ããæã¨ãã
ãã®ãã¼ã¯ãã®å¾åºã¦ããã¡ãã¥ã¼ãé¸æããªãããããªãã¦ãã ãããã¯ç¹åããã·ã§ã¼ãã«ãããã¼ãããã®ã§ãããè¦ãããä¸çºã ã£ãããã¾ããã§ããã¾ã使ããªãã·ã§ã¼ãã«ãããã¼è¦ããããããªãã空æ°èªãã§ãããæ¹ããããããã
ã³ã¼ãè£å®
ããªããå©ããªãã¦ãåæã«åºã¦ããããã©ã
ãã³ãã¬ã¼ãè£å®
IntelliJ IDEAã®ãã³ãã¬ã¼ãã¯Live Templateã¨è¨ãããããã©ãè¨ãæ©è½ãããã®ãããããã£ã¦ãªãã§ãããé©å½ã«æ¸ãã¦åºå®ã®ãã³ãã¬ã¼ãã«ãããããã¬ã¼ã¹ãã«ãã¼ã¿ãããªæãã«ãããã¨ã¯æ¯è¼çç°¡åãEclipseã®ãã³ãã¬ã¼ãããã¾ã使ãããªãã¦ãªãã®ã§ãå人çã«ããã§å°ããã¨ã¯ãªãããã
è¡ã移åãã
ä»ã®ã¨ãã£ã¿ã§ã¯ãã¾ãç¡ãæ°ããããé¸æè¡ã®ä½ç½®ã移åãããã¼ãã«ã¼ã½ã«ä½ç½®ã«ããè¡ããããã移åã§ãããä½æ°ã«ä¾¿å©ã
è¡ãæ¶ãåé¤
IntelliJ IDEA㧠⌘D å©ãã¨ããã®è¡ãè¤è£½ããã¾ããéããã ãããããã¨ã¯ãã®éãªãã â¦â¦ã¨ãã¡ãªã¿ã«Eclipseã§ã®è¡è¤è£½ã¯ ⌥⌘â ã§åºæ¥ãããã¾ãã
ã³ã¼ããã©ã¼ããã
IntelliJ IDEAã®æ¹ã¯ãã¤ã¢ãã°ãåºã¦ãã¦OrganizeImportãä¸ç·ã«ãããã¼ï¼ã¨ãèãã¦ããã"Do not show this dialog in the future"ã«ãã§ãã¯ãå ¥ããã°ãã¤ã¢ãã°åºã¦æ¥ãªããªããããæ»ãæ¹ããããªãããããã§ãã¯å ¥ããããªãâ
ååå¤æ´
ã¯ã©ã¹åãã¡ã½ããåãã´ãªã´ãªå¤æ´ãããªãã¡ã¯ã¿ãªã³ã°ããã®æ©è½ã¯IntelliJ IDEAã®æ¹ãå¼·ãæ°ããããã¨è¨ãã®ãããã¹ã対象ã¯ã©ã¹åãå¤æ´ããããã¹ãã¯ã©ã¹åãå¤ãã£ã¦ããããEclipseã¯ããã¾ã§é¢åè¦ã¦ãããªããIntelliJ IDEAãã¯ã©ã¹ã¨ãã¹ãã¯ã©ã¹ã®å¯¾å¿ãæ¨æºã§ãµãã¼ããã¦ãããããã
å®è¡ï¼ããã«ãã¹ãï¼
Eclipseã ã¨⇧ãæãã°Debugå®è¡ã«ãªããæ¼ããã¼å°ãªãã¦æ¸ããããã¬ã¼ã¯ãã¤ã³ããç½®ããã«Debugãã¦ãããããçµæã¯å¤ãããªããããIntelliJ IDEAã§Debugãããã¨ãã¯F9ã«ãªãã½ããå°å³ã«ä¼¼ã¦ãããæ··åããªãããã«æ°ãã¤ããã°â¦â¦ã
ãã¼ã«ã«å¤æ°ã¸ã®å²å½
ãã¼ã«ã«å¤æ°ãä¸çªãã使ãããã£ã¼ã«ããªãã©ã¡ãã§ãFã§ãããããã®ã·ã§ã¼ãã«ããã¯ã©ã¡ãã空æ°èªãæ©è½ã§ãã£ã¦ãããã®ã§ãããããè¦ããªãã¦ã⏎2åå©ããæ¹ãæ©ããããããªãã
ã¤ã³ã©ã¤ã³å
ãã¼ã«ã«å¤æ°ã¸ã®å²å½ã®éã®æä½ãä¸æå¤æ°ã使ãã使ããªããã¯ç¶æ³ä¾åã§ãããçµæ§ä½¿ããã¨ãå¤ãã§ããä¸è¬çã«ä¸æå¤æ°ã使ã£ãæ¹ãã³ã¼ãã®è¡¨ç¾åã¯åä¸ãã¾ãããããã¾ã§å¤ãããªãå ´åãªã©ãã¤ã³ã©ã¤ã³åãã¦ãã¾ã£ãã»ããè¯ãå ´åãããã¾ãã®ã§ã
ãªããè²ã çæ
getter/setterã¨ãtoStringã¨ããWindows+Eclipseã ã¨Ctrl+Alt+S,Sã¨é£æã¨ããã¼ã ãã§ã³ã³ããã¹ãã¡ãã¥ã¼é¸ã¶ã¨ããã¾ã§ãã£ã¦ãããããããã§ããã©ãMacã ã¨ã¡ãã¥ã¼ãä¸ä¸ãã¼ã§é¸ãã æ¹ãæ©ãã¦ãããã
Eclipseã ã¨å
¨é¨ã ãã£ã¨åºããã ãã©ãIntelliJ IDEAã¯åºæ¥ãæä½ã«éããã¦ã¦ã¡ãã£ã¨è¦ªåãããã
ã¡ãã£ã¨é©ãããã¨
ããããFizzBuzzã§ããæ¸ãã¨ãæå¾ã®è¡ãã³ã³ãã¤ã«ã¨ã©ã¼ã«ãªãã¾ãããã
public String fizzBuzz(int i) { if (i % 15 == 0) return "FizzBuzz"; if (i % 3 == 0) return "Fizz"; if (i % 5 == 0) return "Buzz"; return i; }
ã§ã¾ããä½ã¨ããã¦ããã¼ã¨ãã£ã¦ã¿ãããã§ãã
- Eclipse: ⌘ + 1
ã¡ã½ããã®æ»ãåãå¤ãã¦ãå°ãå ´é¢ãå¼æ°ã®åãå¤ããã®ã¯æ£ç´ä½¿ããªãæ°ãããããã£ã±ç¡çããªã¼â¦â¦ã¨ã
- IntelliJ IDEA: ⌥ + ⏎
String.valueOf ã§å
ãã§ãããããªã«ãããããã
ä¸è¦§
æä½ | Eclipse | IntelliJ IDEA |
---|---|---|
空æ°èªã | ⌘ + 1 | ⌥ + ⏎ |
ã³ã¼ãè£å® | ^ + Space | ^ + Space |
ãã³ãã¬ã¼ãè£å® | ^ + Space | Tab |
è¡ã移åãã | ⌥ + â or â | ⌥ + ⇧ + â or â |
è¡ãæ¶ãåé¤ | ⌘ + D | ⌘ + X |
ã³ã¼ããã©ã¼ããã | ⇧ + ⌘ + F | ⌥ + ⌘ + L |
ã¤ã³ãã¼ã | ⌘ + ⇧ + O | ï¼ãã©ã¼ãããã¨åãï¼ |
ååå¤æ´ | ⌥ + ⌘ + R | ⇧ + F6 |
å®è¡ï¼ããã«ãã¹ãï¼ | ⇧ + ⌘ + F11 | ⌥ + ⇧ + F10 |
ãã¼ã«ã«å¤æ°ã¸ã®å²å½ | ⌘ + 2, L | ⌥ + ⌘ + V |
ã¤ã³ã©ã¤ã³å | ⌥ + ⌘ + I | ⌥ + ⌘ + N |
ãªããè²ã çæ | ⌥ + ⌘ + S | ^ + N |
å®ç¾©ã«ç§»å | F3 | ⌘ + B |
æ°ã¥ããã足ãã¦ãã