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 Shell parentShell;
    /** 
     * Create a new operation initialized with a shell. 
     * 
     * @param shell parent shell for error dialogs
     */
    public CopyProjectOperation(Shell shell) {
        parentShell = shell;
    }
    /**
     * Paste a copy of the project on the clipboard to the workspace.
     * @param project The project that is beign copied.
     */
    public void copyProject(IProject project) {
        errorStatus = null;
        
        ProjectLocationSelectionDialog dialog = new ProjectLocationSelectionDialog(
                parentShell, project);
        dialog.setTitle(IDEWorkbenchMessages.CopyProjectOperation_copyProject);
        if (dialog.open() != Window.OK)
            return;
        Object[] destinationPaths = dialog.getResult();
        if (destinationPaths == null)
            return;
        String newName = (String) destinationPaths[0];
        IPath newLocation = new Path((String) destinationPaths[1]);
        boolean completed = performProjectCopy(project, newName, newLocation);
        if (!completed) 
            return;