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
.getString("DeleteResourceAction.messageTitle"), 
                                IDEWorkbenchMessages
                                        .format(
                                                "DeleteResourceAction.internalError", new Object[] { t.getMessage() })); 
            }
        } catch (InterruptedException e) {
            
        }
    }
    /*
     * Return the scheduling rule that encompasses the deletion of the selected resources
     */
    private ISchedulingRule getDeleteRule(IResource[] resourcesToDelete) {
        IResourceRuleFactory ruleFactory = ResourcesPlugin.getWorkspace().getRuleFactory();
        ISchedulingRule combinedRule = null;
        for (int i = 0; i < resourcesToDelete.length; i++) {
            IResource resource = resourcesToDelete[i];
            ISchedulingRule deleteRule = ruleFactory.deleteRule(resource);
            if (combinedRule == null) {
                combinedRule = deleteRule;
            } else {
                combinedRule = MultiRule.combine(combinedRule, deleteRule);
            }
        }
        return combinedRule;
    }
    /**
     * Returns the resources to delete based on the selection and their read-only status.
     * 
     * @param resources the selected resources