summaryrefslogtreecommitdiff
path: root/scalalib/src/GenIdeaImpl.scala
diff options
context:
space:
mode:
Diffstat (limited to 'scalalib/src/GenIdeaImpl.scala')
-rwxr-xr-xscalalib/src/GenIdeaImpl.scala16
1 files changed, 10 insertions, 6 deletions
diff --git a/scalalib/src/GenIdeaImpl.scala b/scalalib/src/GenIdeaImpl.scala
index c0e41426..03f38b62 100755
--- a/scalalib/src/GenIdeaImpl.scala
+++ b/scalalib/src/GenIdeaImpl.scala
@@ -545,19 +545,23 @@ case class GenIdeaImpl(evaluator: Evaluator,
<output url={outputUrl} />
}
<exclude-output />
- <content url={"file://$MODULE_DIR$/" + relify(generatedSourceOutputPath)} />
+ {
+ for {
+ generatedSourcePath <- (generatedSourcePaths.toSeq ++ Seq(generatedSourceOutputPath)).distinct.sorted
+ path <- Seq(relify(generatedSourcePath))
+ } yield
+ <content url={"file://$MODULE_DIR$/" + path}>
+ <sourceFolder url={"file://$MODULE_DIR$/" + path} isTestSource={isTest.toString} generated="true" />
+ </content>
+ }
<content url={"file://$MODULE_DIR$/" + relify(basePath)}>
{
+ // keep the "real" base path as last content, to ensure, Idea picks it up as "main" module dir
for (normalSourcePath <- normalSourcePaths.toSeq.sorted)
yield
<sourceFolder url={"file://$MODULE_DIR$/" + relify(normalSourcePath)} isTestSource={isTest.toString} />
}
{
- for (generatedSourcePath <- generatedSourcePaths.toSeq.sorted)
- yield
- <sourceFolder url={"file://$MODULE_DIR$/" + relify(generatedSourcePath)} isTestSource={isTest.toString} generated="true" />
- }
- {
val resourceType = if (isTest) "java-test-resource" else "java-resource"
for (resourcePath <- resourcePaths.toSeq.sorted)
yield