public void doGenerate(final Resource resource, final IFileSystemAccess fsa) {
String _elvis = null;
EList<EObject> _contents = resource.getContents();
Iterable<Body> _filter = Iterables.<Body>filter(_contents, Body.class);
Body _head = IterableExtensions.<Body>head(_filter);
PackageConfig _packageConfig = _head.getPackageConfig();
String _name = null;
if (_packageConfig!=null) {
_name=_packageConfig.getName();
}
if (_name != null) {
_elvis = _name;
} else {
_elvis = ObjectExtensions.<String>operator_elvis(_name, "default");