use of org.metaborg.core.language.FacetContribution in project spoofax by metaborg.
the class ActionService method actionContributions.
@Override
public Collection<TransformActionContrib> actionContributions(ILanguageImpl language, ITransformGoal goal) {
final Iterable<FacetContribution<ActionFacet>> facetsContributions = language.facetContributions(ActionFacet.class);
final Collection<TransformActionContrib> actionContributions = Lists.newLinkedList();
for (FacetContribution<ActionFacet> facetContribution : facetsContributions) {
final ActionFacet facet = facetContribution.facet;
final ILanguageComponent component = facetContribution.contributor;
for (ITransformAction action : facet.actions(goal)) {
actionContributions.add(new TransformActionContrib(action, component));
}
}
return actionContributions;
}
Aggregations