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/CloseResourceAction.java
IEditorPart editor = editors[k];
                    IFile inputFile = ResourceUtil.getFile(editor.getEditorInput());
                    if (inputFile != null) {
                        if (projects.contains(inputFile.getProject())) {
                            dirtyEditors.add(editor);
                        }
                    }
                }
            }
        }
        return dirtyEditors;
    }
    /**
     * Open a dialog that can be used to select which of the given
     * editors to save. Return the list of editors to save.  A value of 
     * null implies that the operation was cancelled.
     * 
     * @return List the editors to save
     */
    List getEditorsToSave(List dirtyEditors) {
        if (dirtyEditors.isEmpty())
            return new ArrayList(0);
        
        
        List saveEditors = new ArrayList(0);
        List dirtyInputs = new ArrayList(0);
        Iterator iter = dirtyEditors.iterator();
        while (iter.hasNext()) {
            IEditorPart editor = (IEditorPart) iter.next();
            IFile inputFile = ResourceUtil.getFile(editor.getEditorInput());