Search code examples
javanetbeansmultiline

Paste a multiline string in NetBeans IDE


Is there a way to paste a multiline string in the NetBeans IDE and have it automatically converted to a string literal (with " escaped to \"), similar to the Eclipse option?

This can be very helpful for example to insert SQL source code.

See also: Paste a multi-line Java String in Eclipse


Solution

  • Netbeans have this function within.

    Type: String myString = "

    Then paste your code and it will be formatted =)