Skip to content

Commit

Permalink
IDEA source dirs : instead of subdirs of all managedSourceDirectories…
Browse files Browse the repository at this point in the history
…, use subdirs of sourceManaged as well as managedSourceDirectories themselves
  • Loading branch information
chwthewke authored and mpeltonen committed Oct 28, 2013
1 parent a24a50c commit 194f7b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/scala/org/sbtidea/SbtIdeaPlugin.scala
Expand Up @@ -170,8 +170,9 @@ object SbtIdeaPlugin extends Plugin {
state.log.info("Running " + config.name + ":" + Keys.managedSources.key.label + " ...")
EvaluateTask(buildStruct, Keys.managedSources in config, state, projectRef)
val managedSourceRoots = settings.setting(Keys.managedSourceDirectories in config, "Missing managed source directories!")
val sourceManaged = settings.setting(Keys.sourceManaged in config, "Missing 'sourceManaged'")
def listSubdirectories(f: File) = Option(f.listFiles()).map(_.toSeq.filter(_.isDirectory)).getOrElse(Seq.empty[File])
managedSourceRoots.flatMap(listSubdirectories)
(listSubdirectories(sourceManaged) ++ managedSourceRoots).distinct
}
else Seq.empty[File]

Expand Down

0 comments on commit 194f7b7

Please sign in to comment.