use of com.intellij.facet.FacetModel in project android by JetBrains.
the class AndroidApplicationArtifactType method getNewArtifactTemplates.
@NotNull
@Override
public List<? extends ArtifactTemplate> getNewArtifactTemplates(@NotNull PackagingElementResolvingContext context) {
final List<AndroidFacet> facets = new ArrayList<AndroidFacet>();
for (Module module : context.getModulesProvider().getModules()) {
final FacetModel facetModel = context.getModulesProvider().getFacetModel(module);
final AndroidFacet facet = facetModel.getFacetByType(AndroidFacet.ID);
if (facet != null && facet.isAppProject()) {
facets.add(facet);
}
}
if (facets.size() == 0) {
return Collections.emptyList();
}
return Collections.singletonList(new MyTemplate(context.getProject(), facets));
}
Aggregations