use of org.jetbrains.plugins.gradle.model.scala.ScalaModel in project intellij-community by JetBrains.
the class ScalaGradleProjectResolverExtension method populateModuleExtraModels.
@Override
public void populateModuleExtraModels(@NotNull IdeaModule gradleModule, @NotNull DataNode<ModuleData> ideModule) {
ScalaModel scalaModel = resolverCtx.getExtraProject(gradleModule, ScalaModel.class);
if (scalaModel != null) {
ScalaModelData scalaModelData = create(scalaModel);
ideModule.createChild(ScalaModelData.KEY, scalaModelData);
}
nextResolver.populateModuleExtraModels(gradleModule, ideModule);
}
use of org.jetbrains.plugins.gradle.model.scala.ScalaModel in project intellij-community by JetBrains.
the class ScalaModelBuilderImplTest method testScalaModel.
@Test
public void testScalaModel() throws Exception {
DomainObjectSet<? extends IdeaModule> ideaModules = allModels.getIdeaProject().getModules();
List<ScalaModel> scalaModels = ContainerUtil.mapNotNull(ideaModules, new Function<IdeaModule, ScalaModel>() {
@Override
public ScalaModel fun(IdeaModule module) {
return allModels.getExtraProject(module, ScalaModel.class);
}
});
assertEquals(1, scalaModels.size());
ScalaModel scalaModel = scalaModels.get(0);
ScalaCompileOptions scalaCompileOptions = scalaModel.getScalaCompileOptions();
assertNotNull(scalaCompileOptions);
assertEquals(1, scalaCompileOptions.getAdditionalParameters().size());
assertEquals("-opt:opt", scalaCompileOptions.getAdditionalParameters().iterator().next());
}
Aggregations