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/CopyProjectOperation.java
*/
    private IProjectDescription createProjectDescription(IProject project,
            String projectName, IPath rootLocation) throws CoreException {
        
        IProjectDescription newDescription = project.getDescription();
        newDescription.setName(projectName);
        
        if (rootLocation.equals(Platform.getLocation()))
            newDescription.setLocation(null);
        else
            newDescription.setLocation(rootLocation);
        return newDescription;
    }
    /**
     * Records the core exception to be displayed to the user
     * once the action is finished.
     *
     * @param error a <code>CoreException</code>
     */
    private void recordError(CoreException error) {
        if (errorStatus == null)
            errorStatus = new MultiStatus(
                    PlatformUI.PLUGIN_ID,
                    IStatus.ERROR,
                    IDEWorkbenchMessages.CopyProjectOperation_copyFailedMessage,
                    error);
        errorStatus.merge(error.getStatus());
    }
}