Search in sources :

Example 6 with JpsSourceFolder

use of com.intellij.project.model.impl.module.content.JpsSourceFolder in project intellij-community by JetBrains.

the class MavenSourceFoldersModuleExtension method unregisterAll.

public void unregisterAll(@NotNull Url url, boolean under) {
    for (Iterator<JpsSourceFolder> iterator = myJpsSourceFolders.iterator(); iterator.hasNext(); ) {
        JpsSourceFolder eachFolder = iterator.next();
        String ancestor = under ? url.getUrl() : eachFolder.getUrl();
        String child = under ? eachFolder.getUrl() : url.getUrl();
        if (VfsUtilCore.isEqualOrAncestor(ancestor, child)) {
            iterator.remove();
            Disposer.dispose(eachFolder);
        }
    }
}
Also used : JpsSourceFolder(com.intellij.project.model.impl.module.content.JpsSourceFolder)

Aggregations

JpsSourceFolder (com.intellij.project.model.impl.module.content.JpsSourceFolder)6 JpsContentEntry (com.intellij.project.model.impl.module.content.JpsContentEntry)3 JpsElement (org.jetbrains.jps.model.JpsElement)2 JpsModuleSourceRoot (org.jetbrains.jps.model.module.JpsModuleSourceRoot)2 JpsRootModel (com.intellij.project.model.impl.module.JpsRootModel)1 Url (org.jetbrains.idea.maven.utils.Url)1 JpsElementBase (org.jetbrains.jps.model.ex.JpsElementBase)1 JavaSourceRootProperties (org.jetbrains.jps.model.java.JavaSourceRootProperties)1 JavaSourceRootType (org.jetbrains.jps.model.java.JavaSourceRootType)1 JpsModuleSourceRootType (org.jetbrains.jps.model.module.JpsModuleSourceRootType)1