Auto-escape strings in eclipse ftw tagged:

Auto-escape strings in eclipse ftw

Posted by in Coding Tricks, How-to, J2ME

I found myself mocking web services return strings for BlackBerry the other day, and pasting loads of quoted text into some static final String fields. While going through the pasted text and escaping each quote, each slash etc, I was thinking “this is not right – there must be a better way!”

Trust eclipse! As with most laborious dev tasks (try refactoring an iOS app and you’ll really appreciate how well eclipse handles that issue) they have solved this one too.

auto-escape text preferences

So…

Preferences menu…

Java > Editor > Typing …

… down the bottom is the “Escape text when pasting…” box.

… if you didn’t know, now you do – feel free to share other eclipse tips below …

hth

<rant> now if they could just fix that cancel button, the world would be a happy place once more! </rant>