use of org.jetbrains.jps.model.java.JavaSourceRootProperties in project intellij-community by JetBrains.
the class ExternalSystemImportingTestCase method assertGeneratedSources.
private void assertGeneratedSources(String moduleName, JavaSourceRootType type, String... expectedSources) {
final ContentEntry[] contentRoots = getContentRoots(moduleName);
final String rootUrl = contentRoots.length > 1 ? ExternalSystemApiUtil.getExternalProjectPath(getModule(moduleName)) : null;
List<SourceFolder> folders = doAssertContentFolders(rootUrl, contentRoots, type, expectedSources);
for (SourceFolder folder : folders) {
JavaSourceRootProperties properties = folder.getJpsElement().getProperties(type);
assertNotNull(properties);
assertTrue("Not a generated folder: " + folder, properties.isForGeneratedSources());
}
}
use of org.jetbrains.jps.model.java.JavaSourceRootProperties in project kotlin by JetBrains.
the class MavenImportingTestCase method assertGeneratedSources.
protected void assertGeneratedSources(String moduleName, String... expectedSources) {
ContentEntry contentRoot = getContentRoot(moduleName);
List<ContentFolder> folders = new ArrayList<ContentFolder>();
for (SourceFolder folder : contentRoot.getSourceFolders(JavaSourceRootType.SOURCE)) {
JavaSourceRootProperties properties = folder.getJpsElement().getProperties(JavaSourceRootType.SOURCE);
assertNotNull(properties);
if (properties.isForGeneratedSources()) {
folders.add(folder);
}
}
doAssertContentFolders(contentRoot, folders, expectedSources);
}
Aggregations