以åGroovy版のIntroduce local variableつくってみたよ - しおしおの雑記帳ã§ç´¹ä»ãããGroovyã§ãQuick Fixã§ãã¼ã«ã«å¤æ°ãæ½åºãããã¤ãIntelliJ CEã«pull requestãã¦ããªãã¨ãmasterã«ãã¼ã¸ãã¦ããããã¨ãã§ãã¾ããã
ãã¤ã«ãªãã®ãã¯ãããã¾ããããè¿ããã¡ã«ã¯æ£å¼ã«ãªãªã¼ã¹ããã¦Groovyããã°ã©ãã®æ¹ã
ã«ä½¿ã£ã¦ãããããã¨ãã§ããã®ããªã¨æã£ã¦ãã¾ãã
ååã®ã¨ã³ããªã¯ããªãé©å½ãªæãã ã£ãã®ã§ãç°¡åã§ããã©ããªãã¨ãã§ããã®ããç´¹ä»ãã¾ãã
ä»æ§
Quick Fixã§Javaã¨åãããã«ãã¼ã«ã«å¤æ°ã®æ½åºãã§ããããã«ãªã£ã¦ãã¾ãã
ãã¼ã«ã«å¤æ°ã«æ½åºã§ããé¨åã¯ãã«ã¼ã½ã«ãããå¼ã®ä¸çªå¤å´ã®ãã®ã¨ãªã£ã¦ãã¾ãã
æå¹/ç¡å¹ã®è¨å®
Intentionsã®Groovy->Declarationã«è¿½å ããã¦ããã®ã§ããã§ãã¯ãoffã«ããã¨ç¡å¹åã§ãã¾ãã
â»ç¹ã«ãsiosioãã¨ãããããããã¨è¡¨ç¤ºããããããããã§ã¯ãªãã®ã§ããã
ä¾
// before args.length // after def length = args.length // before 10 * 10 // after def i = 10 * 10
pull requestéã£ã¦ã¿ã¦æã£ããã¨ã»ã»ã»
ãã£ã±ãè±èªããããªãã«åºæ¥ãªãã¨ãã¤ããç§ã¯ãè±èªããã³ãé§ç®ãªã®ã§ããªãè¦å´ãã¾ããã
幸ãã«ããããã¾ã§é£ãããã¨ãè¨ãããªãã£ããããªæ°ãããã®ã§ããªãã¨ãããåããã§ããæ°ããã¾ãããï¼ã¡ããã¨åã¿åã£ã¦ããã©ããã¯ãããã¾ãããï¼
ãã¨ãæå¤ã¨ãã£ãããã¼ã¸ããããã ãªã¨ãå¥ç´æ¸éã£ã¦ããã¨è¨ããã¦ãéã£ããå³ãã¼ã¸ãããã®ã§ã¡ãã£ã¨ã³ã£ãããã¾ããã
ãããã