GROOVY-3328: Automatic imports for selected text execution

Created pull request to of suggested solution by Jose Osinde and test by Sergey Bondarenko
Merge pull request #278 from PascalSchumacher/GROOVY-3328

GROOVY-3328: Automatic imports for selected text execution