Project: Birt
Bug 235551 Exception is thrown out when select master page header [05]
Reported: 2008-06-04 04:36:27 | Status: closed fixed

Description: Exception is thrown out when select master page header. Build number: 2.3.0.v20080604-0630 Steps to reproduce: 1. New a library, open "Property Editor". 2. Select "Simple Master Page->Header" in the Outline View. Expected result: No exception. Actual result: Exception is thrown out. Error log: java.lang.ClassCastException: org.eclipse.birt.report.designer.internal.lib.editparts.LibraryReportDesignEditPart at org.eclipse.birt.report.designer.internal.ui.editors.schematic.editparts.AreaEditPart.refreshFigure(AreaEditPart.java:101) at org.eclipse.birt.report.designer.internal.ui.editors.schematic.editparts.ReportElementEditPart.refreshVisuals(ReportElementEditPart.java:549) at org.eclipse.gef.editparts.AbstractEditPart.refresh(AbstractEditPart.java:676) at org.eclipse.gef.editparts.AbstractGraphicalEditPart.refresh(AbstractGraphicalEditPart.java:571) at org.eclipse.gef.editparts.AbstractEditPart.addNotify(AbstractEditPart.java:235) at org.eclipse.gef.editparts.AbstractGraphicalEditPart.addNotify(AbstractGraphicalEditPart.java:219) at org.eclipse.gef.editparts.AbstractEditPart.addChild(AbstractEditPart.java:198) at org.eclipse.gef.editparts.AbstractEditPart.refreshChildren(AbstractEditPart.java:727) at org.eclipse.birt.report.designer.internal.ui.editors.schematic.editparts.ReportElementEditPart.refreshChildren(ReportElementEditPart.java:562) at org.eclipse.gef.editparts.AbstractEditPart.refresh(AbstractEditPart.java:677) at org.eclipse.gef.editparts.AbstractGraphicalEditPart.refresh(AbstractGraphicalEditPart.java:571) at org.eclipse.birt.report.designer.internal.lib.editparts.LibraryReportDesignEditPart.propertyChange(LibraryReportDesignEditPart.java:152) at org.eclipse.birt.report.designer.core.model.LibraryHandleAdapter.firePropertyChangeEvent(LibraryHandleAdapter.java:104) at org.eclipse.birt.report.designer.core.model.LibraryHandleAdapter.setCurrentEditorModel(LibraryHandleAdapter.java:187) at org.eclipse.birt.report.designer.internal.lib.commands.SetCurrentEditModelCommand.execute(SetCurrentEditModelCommand.java:55) at org.eclipse.birt.report.designer.ui.editors.LibraryLayoutEditor.handleSelectionChange(LibraryLayoutEditor.java:117) at org.eclipse.birt.report.designer.internal.ui.editors.layout.ReportEditorWithPalette.performRequest(ReportEditorWithPalette.java:669) at org.eclipse.birt.report.designer.ui.editors.LibraryLayoutEditor.performRequest(LibraryLayoutEditor.java:89) at org.eclipse.birt.report.designer.core.util.mediator.ReportMediator.notifyRequest(ReportMediator.java:125) at org.eclipse.birt.report.designer.internal.ui.views.NonGEFSynchronizerWithTreeView.fireSelectionChanged(NonGEFSynchronizerWithTreeView.java:133) at org.eclipse.birt.report.designer.internal.ui.views.NonGEFSynchronizerWithTreeView.treeSelect(NonGEFSynchronizerWithTreeView.java:109) at org.eclipse.birt.report.designer.internal.ui.views.NonGEFSynchronizerWithTreeView$1.selectionChanged(NonGEFSynchronizerWithTreeView.java:158) at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.runtime.Platform.run(Platform.java:880) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:160) at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:2062) at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:1138) at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1168) at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:227) at org.eclipse.jface.util.OpenStrategy.access$3(OpenStrategy.java:221) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:388) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1002) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3801) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3400) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2387) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2351) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2203) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:112) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:379) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504) at org.eclipse.equinox.launcher.Main.run(Main.java:1236)

Files changed in fix:
UI/org.eclipse.birt.report.designer.ui.lib/src/org/eclipse/birt/report/designer/internal/lib/editparts/LibraryGraphicalPartFactory.java