Blog

Java で JSON をテストケースに貼り付けた後でエスケープしてまわるのが辛いときに

http://javarevisited.blogspot.jp/2012/12/how-to-escape-text-when-pasting-as-String-Eclipse-tips.html

ここにあるように、Preferences -> Java -> Editor -> Typing の "Escape text when pasting into a String literal" をオンにすれば、文字列リテラル中に貼り付けた場合、自動的にエスケープされるようになって楽!

Java 10 ぐらいで raw string サポートされないかなあ。