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
*/
    protected boolean fTestingMode = false;
    /**
     * Creates a new delete resource action.
     *
     * @param shell the shell for any dialogs
     */
    public DeleteResourceAction(Shell shell) {
        super(IDEWorkbenchMessages.DeleteResourceAction_text);
        setToolTipText(IDEWorkbenchMessages.DeleteResourceAction_toolTip);
        PlatformUI.getWorkbench().getHelpSystem().setHelp(this,
				IIDEHelpContextIds.DELETE_RESOURCE_ACTION);
        setId(ID);
        if (shell == null) {
            throw new IllegalArgumentException();
        }
        this.shell = shell;
    }
    /**
     * Returns whether delete can be performed on the current selection.
     *
     * @param resources the selected resources
     * @return <code>true</code> if the resources can be deleted, and 
     *  <code>false</code> if the selection contains non-resources or phantom
     *  resources
     */
    private boolean canDelete(IResource[] resources) {
         
        
        if (!(containsOnlyProjects(resources) || containsOnlyNonProjects(resources))) {