Pregenerate Eclipse and IntelliJ projects.
Test for the elvis macro.

The idea is to emulate the Groovy's elvis operator.

elvis(a.b.c) should return null if `a` or `a.b` returns null.
Add the macro declaration.

Note that we must restrict the macro to nullable types.
This excludes primitives, subtypes of NotNull, and unbounded
abstract types.

  EXERCISE: create a corresponding macro definition:

    `def elvisImpl[...](...)(...): ... = ???`
Fleshed out the macro impl signature.

  EXERCISE: implement the body of the macro as the identity function
            no null checking yet.
Make the elvis macro an identity function for now.

EXERCISE: emit `try { a } catch { case _: NullPointerException => null }
          To start with, let's try this with `reify`.
Catch NullPointerException as a poor-man's elvis implementation.

  EXERCISE: try to implement the same thing with a) manual tree creation
            (http://docs.scala-lang.org/overviews/reflection/symbols-trees-types.html)
Test case to motivate the next steps.

Blindly catching NPEs is not safe, we only want to
handle null dereferences in this expression!
Naive attempt to manually create try / catch tree.

Used the results of this REPL session verbatim:

    scala> import scala.reflect.runtime.universe._
    import reflect.runtime.universe._

    scala> showRaw(reify ( try { "" } catch { case _: NullPointerException => null } ))
    res2: String = Try(Literal(Constant("")), List(CaseDef(Typed(Ident(nme.WILDCARD), Ident(newTypeName("NullPointerException"))), EmptyTree, Literal(Constant(null)))), EmptyTree)

EXERCISE: This suffers from a lack of "Hygiene" (http://en.wikipedia.org/wiki/Hygienic_macro).
          Can you add a class definition in Test.scala causes an error in the macro expansion?
Demonstrate the lack of hygiene.

EXERCISE: Change the macro to refer to `NullPointerException` by
          Symbol, rather than by name. We sometimes refer to this as
          "being sym-ful".

          `c.universe.staticClass("fully.qualified.Name") will lookup
          the symbol; `Ident(sym)` will construct an Ident tree with the
          name of the given symbol, and with the Tree's symbol field
          already referring to that symbol. This will not be changed
          during typechecking of the expanded macro.
Use c.mirror.staticClass to hygenically refer to NPE.

NOTE: In the full compiler API, one could have written
      `val sym = requiredClass[java.lang.NullPointerException]`
      See: src/reflect/scala/reflect/internal/Mirrors.scala

EXERCISE: Now change the implementation to construct the
          Try node with QuasiQuotes.

          http://docs.scala-lang.org/overviews/macros/quasiquotes.html

          Note that quasiquotes are in the experimental
          "Macro Paridise" build only; but we hope to include
          them in Scala 2.11.

          In this project, Quasiquotes can only be used in `Helper.scala`
          you will need to create a new method in that file, and delegate
          to it. Follow the pattern in `Macros#impl`.
Use quasiquotes for try/catch generation.
Transform code to null-guard all Selects.
Use quasiquotes to pattern match on the Select node.