In-String Pasting

Guys,

first of all: The IDEA Scala Plugin is an excellent piece of work with a lot of momentum, thanks a lot for all your efforts!!

One small thing that I am dearly missing right now: Automatic escaping during the pasting of text into a string literal.
Might not sound like something really important, however, it greatly reduces the turn around time in a TDD scenario.
A lot of my tests end up relying on comparisons of multi-line strings (e.g. "print-outs" of object trees) for which IDEA
automatically offers proper "diff"-ing (with its TestNG support plugin).

Back in my Java days I could very quickly copy multi-line strings from my test outputs back into the source window
where they would be automatically escaped and formatted during the paste
(try pasting a multi-line string into a Java string literal!)

It shouldn't be too hard to copy the exact same behavior over to the Scala plugin (I hope).

IMHO the many small polishings like this one are one of the main reasons why IDEA has become the tool of choice for
many developers in the JVM world...

Cheers,
Frank

3 comments
Comment actions Permalink

In the meantime, you could use scala raw strings:

val multiLine = """foo bar baz
baz foo bar""

1
Comment actions Permalink

I've created an issue. It is already fixed :) so try the next nightly build.

0
Comment actions Permalink

Wow!

That's what I call momentum... :)

Thanks a lot for this extremely fast reaction, Pavel.

Looking forward to the next build...

Cheers,
Frank

0

Please sign in to leave a comment.