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
ProjectLocationSelectionDialog dialog = new ProjectLocationSelectionDialog(
                shell, project);
        dialog.setTitle(IDEWorkbenchMessages.CopyProjectAction_copyTitle);
        dialog.open();
        return dialog.getResult();
    }
    /**
     * Records the core exception to be displayed to the user
     * once the action is finished.
     *
     * @param error a <code>CoreException</code>
     */
    final void recordError(CoreException error) {
        this.errorStatus = error.getStatus();
    }
    /**
     * Implementation of method defined on <code>IAction</code>.
     */
    public void run() {
        errorStatus = null;
        IProject project = (IProject) getSelectedResources().get(0);
        
        Object[] destinationPaths = queryDestinationParameters(project);
        if (destinationPaths == null)
            return;
        String newName = (String) destinationPaths[0];
        IPath newLocation = new Path((String) destinationPaths[1]);
        boolean completed = performCopy(project, newName, newLocation);
        if (!completed) 
            return;