JetBrains/kotlin — pull request #367 by zgrannan (2014-02-09 19:43:26+00:00)
Title: safe access → if-then expression, if-then expression → safe access intention

Added an intention to convert an expression of the form

foo?.bar()

to the form

if (foo != null) foo.bar() else null

and vice versa.

If the expression of the left hand side of the safe-access operator 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 safe-access expression of the form:

foo()?.bar

could be converted to the form

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