mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
faster module excludes processing
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user