/** * Copies the given resources to the destination container with the given * name. * <p> * Note: the destination container may need to be created prior to copying * the resources. * </p> * * @param resources * the resources to copy * @param destination * the path of the destination container * @param monitor * a progress monitor for showing progress and for cancelation * @return <code>true</code> if the copy operation completed without * errors */ private boolean performCopy(IResource[] resources, IPath destination, IProgressMonitor monitor) { try { ContainerGenerator generator = new ContainerGenerator(destination); generator.generateContainer(new SubProgressMonitor(monitor, 10)); IProgressMonitor subMonitor = new SubProgressMonitor(monitor, 75); copy(resources, destination, subMonitor); } catch (CoreException e) { recordError(e); // log error return false; } finally { monitor.done(); } return true; }