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.lib.explorer/src/org/eclipse/birt/report/designer/ui/lib/explorer/LibraryExplorerView.java
package org.eclipse.birt.report.designer.ui.lib.explorer;
import java.util.HashMap;
import java.util.Map;
import org.eclipse.birt.report.designer.internal.ui.util.UIUtil;
import org.eclipse.birt.report.designer.internal.ui.views.ILibraryProvider;
import org.eclipse.birt.report.designer.nls.Messages;
import org.eclipse.birt.report.designer.ui.editors.AbstractMultiPageEditor;
import org.eclipse.core.resources.IFile;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.part.IContributedContentsView;
import org.eclipse.ui.part.IPage;
import org.eclipse.ui.part.MessagePage;
import org.eclipse.ui.part.PageBook;
import org.eclipse.ui.part.PageBookView;
/**
 * Attribute view shows the attributes of the selected control. If no control is
 * selected, it will show no attributes and a sentence describing there is
 * nothing to show for the selected object.
 * </p>
 * Multi-selection of control of the same type will normally show the same UI as
 * if only one control was selected. Some of the values may be gray or blank if
 * the selected controls have different attributes. If the controls have
 * different type, nothing will be shown in the attributes view.
 * </P>
 * 
 * 
 */
public class LibraryExplorerView extends PageBookView