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/CopyResourceAction.java
if (getSelectedNonResources().size() > 0) {
            return false;
        }
        
        List selectedResources = getSelectedResources();
        if (selectedResources.size() == 0)
            return false;
        IContainer firstParent = ((IResource) selectedResources.get(0))
                .getParent();
        if (firstParent == null) {
            return false;
        }
        Iterator resourcesEnum = selectedResources.iterator();
        while (resourcesEnum.hasNext()) {
            IResource currentResource = (IResource) resourcesEnum.next();
            if (!currentResource.exists()) {
                return false;
            }
            if (currentResource.getType() == IResource.PROJECT) {
                return false;
            }
            IContainer parent = currentResource.getParent();
            if ((parent != null) && (!parent.equals(firstParent))) {
                return false;
            }
        }
        return true;
    }
}