boolean (@NotNull PackagingElement<?> element, @NotNull PackagingElementPath path) { if (element instanceof FileCopyPackagingElement) { final VirtualFile file = ((FileCopyPackagingElement)element).findFile(); if (file != null) { sourceFile.set(file); } } else if (element instanceof DirectoryCopyPackagingElement) { final VirtualFile file = ((DirectoryCopyPackagingElement)element).findFile(); if (file != null) { sourceDir.set(file); return false; } } return true; }