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
static class DeleteProjectDialog extends MessageDialog {
        private IResource[] projects;
        private boolean deleteContent = false;
        
        /**
         * Control testing mode.  In testing mode, it returns true to
         * delete contents and does not pop up the dialog.
         */
        private boolean fIsTesting = false;
        private Button radio1;
        private Button radio2;
        DeleteProjectDialog(Shell parentShell, IResource[] projects) {
            super(parentShell, getTitle(projects), null, 
                    getMessage(projects), MessageDialog.QUESTION, new String[] {
                            IDialogConstants.YES_LABEL,
                            IDialogConstants.NO_LABEL }, 0); 
            this.projects = projects;
        }
        static String getTitle(IResource[] projects) {
            if (projects.length == 1)
                return IDEWorkbenchMessages.DeleteResourceAction_titleProject1;
            return IDEWorkbenchMessages.DeleteResourceAction_titleProjectN;
        }
        static String getMessage(IResource[] projects) {
            if (projects.length == 1) {
                IProject project = (IProject) projects[0];
                return NLS.bind(IDEWorkbenchMessages.DeleteResourceAction_confirmProject1, project.getName());
            }
            return NLS.bind(IDEWorkbenchMessages.DeleteResourceAction_confirmProjectN, new Integer(projects.length));