PackagingElementOutputKind (PackagingElementResolvingContext context) { VirtualFile file = findFile(); if (file == null) return PackagingElementOutputKind.OTHER; if (file.isDirectory() && file.isInLocalFileSystem()) { boolean containsDirectories = false; boolean containsJars = false; for (VirtualFile child : file.getChildren()) { if (child.isDirectory() && child.isInLocalFileSystem()) { containsDirectories = true; } else { containsJars |= isJar(child); } if (containsDirectories && containsJars) break; } return new PackagingElementOutputKind(containsDirectories, containsJars); } return isJar(file) ? PackagingElementOutputKind.JAR_FILES : PackagingElementOutputKind.OTHER; }