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/CopyProjectAction.java
if (errorStatus != null) {
            ErrorDialog.openError(this.shell, getErrorsTitle(), null,
                    errorStatus);
            errorStatus = null;
        }
    }
    /**
     * The <code>CopyResourceAction</code> implementation of this
     * <code>SelectionListenerAction</code> method enables this action only if 
     * there is a single selection which is a project.
     */
    protected boolean updateSelection(IStructuredSelection selection) {
        if (!super.updateSelection(selection)) {
            return false;
        }
        if (getSelectedNonResources().size() > 0) {
            return false;
        }
        
        List selectedResources = getSelectedResources();
        if (selectedResources.size() != 1)
            return false;
        IResource source = (IResource) selectedResources.get(0);
        if (source instanceof IProject && ((IProject) source).isOpen())
            return true;
        return false;
    }
}