use of com.intellij.openapi.roots.ContentEntry in project Intellij-Plugin by getgauge.
the class GaugeLibHelper method checkProjectSourceAndOutputDirectory.
private void checkProjectSourceAndOutputDirectory(ModifiableRootModel modifiableModel) {
VirtualFile[] sourceRoots = modifiableModel.getSourceRoots();
if (sourceRoots.length < 1) {
ContentEntry contentEntry = modifiableModel.addContentEntry(modifiableModel.getProject().getBaseDir());
VirtualFile srcPath = srcPath(modifiableModel);
if (srcPath != null) {
contentEntry.addSourceFolder(srcPath, false);
}
CompilerModuleExtension compilerModuleExtension = modifiableModel.getModuleExtension(CompilerModuleExtension.class);
compilerModuleExtension.setCompilerOutputPath(outputPath(modifiableModel.getModule()));
compilerModuleExtension.setCompilerOutputPathForTests(testOutputPath(modifiableModel.getModule()));
compilerModuleExtension.inheritCompilerOutputPath(false);
compilerModuleExtension.commit();
}
}
Aggregations