Collection<VirtualFile> () { Collection<VirtualFile> result = new ArrayList<>(); for (int i = 0; i < getChildCount(); i++){ FileOrDirectoryTreeNode child = (FileOrDirectoryTreeNode)getChildAt(i); result.addAll(child.getVirtualFiles()); } return result; }