Bug 66497 All projects deletion triggers full workspace reindexing
Build RC1 Tracing transient memory allocation, I observed that when selecting all (binary linked) projects from a self-hosting workspace, lots of memory was allocated due to Java indexing activity. Looking deeper, I observed that the PDE container was being reset as soon as notified from resource deletions (likely to compensate project deletion, and rebinding using the target platform material instead). From our end, these classpath settings are trusted and honoured, thus inducing major model refresh, and index rebuilds. However, the updated projects are all being deleted as well, since I selected them all for deletion. So PDE seems to induce tons of work for no reason. You could check the PRE_DELETE event, so as to figure the list of projects which are pointless to update since going to be discarded anyway.
bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/DeleteResourceAction.java
*/
    private IResource[] getSelectedResourcesArray() {
        List selection = getSelectedResources();
        IResource[] resources = new IResource[selection.size()];
        selection.toArray(resources);
        return resources;
    }
    /**
     * Returns a bit-mask containing the types of resources in the selection.
     * 
     * @param resources the selected resources
     */
    private int getSelectedResourceTypes(IResource[] resources) {
        int types = 0;
        for (int i = 0; i < resources.length; i++) {
            types |= resources[i].getType();
        }
        return types;
    }
    /* (non-Javadoc)
     * Method declared on IAction.
     */
    public void run() {
        IResource[] resources = getSelectedResourcesArray();
        
         
        
        
        if (!confirmDelete(resources))
            return;