Merge remote-tracking branch 'origin/master'

This commit is contained in:
anna
2012-04-30 16:32:21 +02:00
2 changed files with 12 additions and 5 deletions
@@ -73,8 +73,11 @@ class Module extends LazyInitializeableObject implements ClasspathItem {//}, Com
excludes = new ArrayList<String>(ownExcludes)
Set<String> allContentRoots = project.modules.values().collect { it.contentRoots }.flatten() as Set
Set<File> myRoots = contentRoots.collect { new File(it) } as Set
Collection<String> newExcludes = (allContentRoots - contentRoots).findAll { PathUtil.isUnder(myRoots, new File(it)) }.collect { FileUtil.toCanonicalPath(it) }
excludes.addAll(newExcludes)
for (root in allContentRoots) {
if (!(root in contentRoots) && PathUtil.isUnder(myRoots, new File(root))) {
excludes << FileUtil.toCanonicalPath(root)
}
}
}
return excludes
}
@@ -367,9 +367,13 @@ public class IdeaProjectLoader {
imlPaths.each { loadModule(it) }
Set<String> allContentRoots = project.modules.values().collect { it.contentRoots }.flatten() as Set
project.modules.values().each { module ->
Set<File> myRoots = module.contentRoots.collect { new File(it) } as Set
Collection<String> newExcludes = (allContentRoots - module.contentRoots).findAll { PathUtil.isUnder(myRoots, new File(it)) }.collect { FileUtil.toCanonicalPath(it) }
module.excludes.addAll(newExcludes)
def ownRootPaths = module.contentRoots
Set<File> myRoots = ownRootPaths.collect { new File(it) } as Set
for (root in allContentRoots) {
if (!(root in ownRootPaths) && PathUtil.isUnder(myRoots, new File(root))) {
module.excludes << FileUtil.toCanonicalPath(root)
}
}
}
}