Bug 123496 [IDE] Use operation validation API for IDE actions
We should use the Resources/Core operation validation API in the IDE actions for manipulating resources.
bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/DeleteResourceAction.java
} else {
                throw exception;
            }
        }
    }
    /**
     * Return an array of the currently selected resources.
     *
     * @return the selected resources
     */
    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.