Bug 303344 OpenWithMenu unnecessarily downcasts to WorkbenchPage
I got an exception when trying to use 'Open With...' in the compatibility layer. On line 344, we downcast to invoke openEditor(IEditorInput, String, boolean, int), which is actually a public API method. We should remove the downcast so that it will run on unchanged.
bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/OpenWithMenu.java
createDefaultMenuItem(menu, file);
        
        
        createOtherMenuItem(menu);
    }
	
    /**
     * Converts the IAdaptable file to IFile or null.
     */
    private IFile getFileResource() {
        if (this.file instanceof IFile) {
            return (IFile) this.file;
        }
        IResource resource = (IResource) this.file
                .getAdapter(IResource.class);
        if (resource instanceof IFile) {
            return (IFile) resource;
        }
       
        return null;
    }
    /* (non-Javadoc)
     * Returns whether this menu is dynamic.
     */
    public boolean isDynamic() {
        return true;
    }
    /**
     * Opens the given editor on the selected file.
     *