Bug 68608 [Dialogs] Resource deletion could be run in the background
If I delete a resource in Eclipse and the deletion is blocked by another job, I get a blocked dialog. I then have to wait until the blocking job finishes. It would be nice if I could have the deletion run in the background and occur when it can. In essence, this is what happens in window except that windows uses a non-modal dialog instead of a "Run in Background" button.
bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/DeleteResourceAction.java
}
    /**
     * Asks the user to confirm a delete operation,
     * where the selection contains only projects.
     * Also remembers whether project content should be deleted.
     *
     * @param resources the selected resources
     * @return <code>true</code> if the user says to go ahead, and <code>false</code>
     *  if the deletion should be abandoned
     */
    private boolean confirmDeleteProjects(IResource[] resources) {
        DeleteProjectDialog dialog = new DeleteProjectDialog(shell, resources);
        int code = dialog.open();
        deleteContent = dialog.getDeleteContent();
        return code == 0; 
    }
    /**
     * Deletes the given resources.
     */
    private void delete(IResource[] resourcesToDelete, IProgressMonitor monitor)
            throws CoreException {
        final List exceptions = new ArrayList();
        forceOutOfSyncDelete = false;
        monitor.beginTask("", resourcesToDelete.length); 
        for (int i = 0; i < resourcesToDelete.length; ++i) {
            if (monitor.isCanceled()) {
                throw new OperationCanceledException();
            }
            try {
                delete(resourcesToDelete[i], new SubProgressMonitor(monitor, 1,