3

I always have my multi-line variables defined like this:

var query = "\
    SELECT \
        this AS that \
        CASE something \
    FROM table \
    WHERE something \
"

But in Eclipse, in the default JavaScript Editor in Eclipse 3.8.0 Web Tools Platform (WTP), everytime I press return, or paste a couple of lines, Eclipse will add quotes like this:

var query = "\
    SELECT \
        this AS that \
        CASE something \
    FROM table \" +
        "    JOIN pasted.line1 \" +
        "    JOIN pasted.line2 \" +
        "    JOIN pasted.line3 \" +
        "    JOIN pasted.line4 \" +
        "WHERE something \
"

Making the indentation annoying and markup not to my personal taste.

Can I disable this specific 'feature' without disabling other tricks of wizardry?

Redsandro
  • 11,060
  • 13
  • 76
  • 106
  • http://stackoverflow.com/questions/1417239/disable-eclipse-auto-completion – The Student Feb 07 '13 at 13:03
  • Possible duplicate of turn off the Eclipse formatter for this section of your code: http://stackoverflow.com/questions/1820908/how-to-turn-off-the-eclipse-code-formatter-for-certain-sections-of-java-code – Christophe Roussy Feb 18 '13 at 15:33
  • 2
    No duplicate. My annoyance here is exactly _what the other asker wants_, and his proposed `Java` solution is not available for `JavaScript`. – Redsandro Feb 22 '13 at 15:10
  • Any good news about how to turn off JavaScript formatting for certain parts? – Shay Elkayam Jun 25 '15 at 07:11
  • I hear you. Unfortunately I haven't figured it out yet. My (lame) solution is to copy/paste these parts from a text editor like [Geany](http://www.windowsremix.com/#!/software/editors/geany) (Linux) or [Notepad++](http://www.windowsremix.com/#!/software/editors/notepadplusplus) (Windows). – Redsandro Jun 25 '15 at 11:09

0 Answers0