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/src/org/eclipse/ui/ide/IDE.java
* If the marker contains an <code>EDITOR_ID_ATTR</code> attribute 
     * the attribute value will be used to determine the editor type to be opened. 
     * If not, the registered editor for the marker resource file will be used. 
     * </p>
     *
     * @param page the workbench page to open the editor in
     * @param marker the marker to open
     * @param activate if <code>true</code> the editor will be activated
     * @return an open editor or <code>null</code> not possible
     * @exception PartInitException if the editor could not be initialized
     */
    public static IEditorPart openEditor(IWorkbenchPage page, IMarker marker,
            boolean activate) throws PartInitException {
        
        if (page == null || marker == null) {
            throw new IllegalArgumentException();
        }
        
        if (!(marker.getResource() instanceof IFile)) {
            IDEWorkbenchPlugin
                    .log("Open editor on marker failed; marker resource not an IFile"); 
            return null;
        }
        IFile file = (IFile) marker.getResource();
        
        IEditorRegistry editorReg = PlatformUI.getWorkbench()
                .getEditorRegistry();
        IEditorDescriptor editorDesc = null;
        try {
            String editorID = (String) marker.getAttribute(EDITOR_ID_ATTR);