Multiline String annotation

598 views
Skip to first unread message

Kenneth

unread,
Jun 16, 2015, 2:53:16 AM6/16/15
to project...@googlegroups.com
Came across this inventive way that can be used for representing multiline Strings in java source code. (Ever needed to paste a quick, non-short, json into your test code?)


Would it be interesting to incorporate support for this in lombok? If so, I could give it a shot...

Ryan Schmitt

unread,
Jun 18, 2015, 3:43:49 AM6/18/15
to project...@googlegroups.com
This is clever, but there are a lot of finer points around multiline strings (e.g. indentation), plus you'd have to guarantee consistent behavior across ecj and javac. How does this interact with embedded HTML, or Javadoc markup (tags like {@code ...})?

Reinier Zwitserloot

unread,
Jun 18, 2015, 11:12:53 AM6/18/15
to project-lombok
What had a similar idea. It would look like this:

String longString = Lombok.longString(/*
   type whatever
   you want here
   we'll deal with it and try to be smart about the indenting.*/);

We can do it, just a matter of finding the time.


 --Reinier Zwitserloot

--
You received this message because you are subscribed to the Google Groups "Project Lombok" group.
To unsubscribe from this group and stop receiving emails from it, send an email to project-lombo...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Marco Servetto

unread,
Jun 18, 2015, 6:46:06 PM6/18/15
to project...@googlegroups.com
I would really, really appreciate this feature!
Reply all
Reply to author
Forward
0 new messages