boolean () { final VirtualFile file = getVirtualFile(); if (file == null || !file.isValid()) return false; VirtualFile[] children = file.getChildren(); if (ArrayUtil.isEmpty(children)) return false; if (ContainerUtil.exists(children, child -> !child.isDirectory())) return true; ViewSettings settings = getSettings(); return settings == null || !settings.isFlattenPackages(); }