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/RenameResourceAction.java
public void setTextActionHandler(TextActionHandler actionHandler) {
        textActionHandler = actionHandler;
    }
    /**
     * Validates the destination file if it is read-only and additionally 
     * the source file if both are read-only.
     * Returns true if both files could be made writeable.
     * 
     * @param source source file
     * @param destination destination file
     * @param shell ui context for the validation
     * @return boolean <code>true</code> both files could be made writeable.
     * 	<code>false</code> either one or both files were not made writeable  
     */
    boolean validateEdit(IFile source, IFile destination, Shell shell) {
        if (destination.isReadOnly()) {
            IWorkspace workspace = ResourcesPlugin.getWorkspace();
            IStatus status;
            if (source.isReadOnly())
                status = workspace.validateEdit(new IFile[] { source,
                        destination }, shell);
            else
                status = workspace.validateEdit(new IFile[] { destination },
                        shell);
            return status.isOK();
        }
        return true;
    }
}