ModelDeclaration declaration,
AstAttribute attribute) {
environment.reportAll(AttributeUtil.reportInvalidElements(attribute, attribute.elements));
List<ModelSymbol> autoProjectios = collectProjections(environment, declaration);
ProjectionsTrait projections = declaration.getTrait(ProjectionsTrait.class);
if (projections == null) {
projections = new ProjectionsTrait(declaration.getOriginalAst().expression, autoProjectios);
} else {
List<ModelSymbol> composite = Lists.create();
composite.addAll(projections.getProjections());
composite.addAll(autoProjectios);
projections = new ProjectionsTrait(declaration.getOriginalAst().expression, composite);
}
declaration.putTrait(ProjectionsTrait.class, projections);
}