Smart Strings

String Literals just got a little smarter!

You can now convert a normal strings to multiline (with triple quotes) string.  Notice how the special characters are escaped. (SCL-2991)

Screen shot 2011-04-28 at 10.52.12 PM.png

Screen shot 2011-04-28 at 10.52.18 PM.png

And back again:

Screen shot 2011-04-28 at 10.52.28 PM.png

Screen shot 2011-04-28 at 10.52.36 PM.png

Similarly, when you paste some text into a normal string (for example: C:\path\file.txt), the appropriate escaping is added. (SCL-3144)

Finally, you can now autocomplete, navigate, and rename-refactor references to classpath resources in string literals. (SCL-3138)

Screen shot 2011-04-28 at 8.22.38 AM.png

These features require a nightly build of the plugin, with the latest EAP build of IDEA 10.5.

This entry was posted in Uncategorized. Bookmark the permalink.

3 Responses to Smart Strings

  1. Alexander Temerev says:

    Hi, Jason. Nice work. :)

  2. Denny says:

    Long story short.

  3. Nello says:

    Intellij’s handling of quotation marks is already so stupid, this is another amazing dog’s breakfast of crap. Leave my quotation marks alone!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">