JetBrains/kotlin — pull request #374 by zgrannan (2014-02-17 11:13:13+00:00)
Title: Elvis to If-Then, If-Then to Elvis intentions

Added an intention to convert an expression of the form

foo ?: bar

to the form

if (foo != null) foo else bar

and vice versa.

If the expression of the left hand side of the elvis expression is a function call, the IDE will create
a temporary value to store the result of the call, and prompt the user for a name of the value.
i.e an elvis expression of the form:

foo() ?: bar

could be converted to the form

val temp = foo()
if (temp != null) temp else bar