Kevin Rahe (2026-03-30 17:19):
I've used NetBeans for developing Java applications for a couple decades now. In the code formatting options I had always configured the editor to format strings split by pressing Enter in the middle of them to put the plus-sign at the end of the original line and begin the continued line with a double-quote. However, with later versions of NetBeans (23, 25 and 28) I can no longer seem to find a setting that lets it format split strings this way. Instead, it puts the plus-sign at the beginning of the continued line. I have hundreds of thousands of lines of code formatted the "old" way and aim to keep any new code consistent with the existing code. However, this now takes a fair amount of manual fiddling every time I split a string. (I write a lot of embedded SQL code so I'm doing this a lot.) Is there any way to tease the newer versions of NetBeans into working the way I want them to? Or do I need to create a new feature request for this? Thank you.
Might not be the answer you are looking for, and pardon me if this is obvious, but if you can move to JDK 17 or later I would recommend using JDK 14's """...""" multi-line strings. There's nothing better for SQL strings, as you can very easily copy and paste from and to pgAdmin / phpMyAdmin / SSMS.
https://howtodoinjava.com/java14/java-text-blocks/ Cheers, Maciej Nux --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
