Bug 116706 Bad Class Cast in IDEReportEditor.java
So I'm trying to open a report with BIRT/Eclipse API using the BIRT 2.0 nightly build code (as of 11/16/2005). the file IDEReportEditor.java method private IFile getFile( IEditorInput input ) { return ( (ReportFileEditorInput) input ).getFile( ); } However, input can be ReportEditorInput which is also an IEditorInput (to support reports found outside projects and workspaces) which doesn't even have a getFile() method on it. This causes a deeply nested exception that causes the report desinger to not be able to show a report that might be physically located outside a workspace.
UI/org.eclipse.birt.report.designer.ui.rcp/src/org/eclipse/birt/report/designer/ui/internal/rcp/actions/OpenFileAction.java
*
 * Contributors:
 *  Actuate Corporation  - initial API and implementation
 *******************************************************************************/
package org.eclipse.birt.report.designer.ui.internal.rcp.actions;
import java.io.File;
import org.eclipse.birt.report.designer.internal.ui.util.ExceptionHandler;
import org.eclipse.birt.report.designer.ui.editors.ReportEditorInput;
import org.eclipse.birt.report.designer.ui.rcp.nls.DesignerWorkbenchMessages;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.content.IContentType;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.util.OpenStrategy;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.ui.IEditorDescriptor;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorRegistry;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.IWorkbenchWindowActionDelegate;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
/**
 * Action to open desinger files.
 */
public class OpenFileAction extends Action implements