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/CopyFilesAndFoldersOperation.java
private void displayError(final String message) {
		messageShell.getDisplay().syncExec(new Runnable() {
			public void run() {
				MessageDialog.openError(messageShell, getProblemsTitle(),
						message);
			}
		});
	}
	/**
	 * Returns the resource either casted to or adapted to an IFile.
	 * 
	 * @param resource
	 *            resource to cast/adapt
	 * @return the resource either casted to or adapted to an IFile.
	 *         <code>null</code> if the resource does not adapt to IFile
	 */
	protected IFile getFile(IResource resource) {
		if (resource instanceof IFile) {
			return (IFile) resource;
		}
		return (IFile) ((IAdaptable) resource).getAdapter(IFile.class);
	}
	/**
	 * Returns java.io.File objects for the given file names.
	 * 
	 * @param fileNames
	 *            files to return File object for.
	 * @return java.io.File objects for the given file names.
	 * @deprecated This method is not longer in use anywhere in this class and
	 *             is only provided for backwards compatability with subclasses