Project: Birt
Bug 117977 Exception is thrown out when editting data set in library outline.
Reported: 2005-11-24 21:17:46 | Status: closed fixed

Description: Exception is thrown out when editting data set in library outline. Steps to reproduce: 1. Create a data source and data set in library file. 2. Edit the data set in library outline view. 3. Library outline is not refreshed right away and when clicking on this data set, exception is thrown out. java.lang.ClassCastException: org.eclipse.birt.report.designer.core.model.views.data.DataSetItemModel at org.eclipse.birt.report.designer.core.model.LibraryHandleAdapter.setCurrentEditorModel(LibraryHandleAdapter.java:96) at org.eclipse.birt.report.designer.internal.lib.commands.SetCurrentEditModelCommand.execute(SetCurrentEditModelCommand.java:39) at org.eclipse.birt.report.designer.internal.lib.editors.LibraryDesigner.handleSelectionChange(LibraryDesigner.java:94) at org.eclipse.birt.report.designer.internal.ui.editors.parts.GraphicalEditorWithFlyoutPalette.performRequest(GraphicalEditorWithFlyoutPalette.java:732) at org.eclipse.birt.report.designer.internal.ui.editors.schematic.AbstractReportDesigner.performRequest(AbstractReportDesigner.java:586) at org.eclipse.birt.report.designer.core.util.mediator.ReportMediator.notifyRequest(ReportMediator.java:121) at org.eclipse.birt.report.designer.internal.ui.views.NonGEFSynchronizerWithTreeView.fireSelectionChanged(NonGEFSynchronizerWithTreeView.java:130) at org.eclipse.birt.report.designer.internal.ui.views.NonGEFSynchronizerWithTreeView.treeSelect(NonGEFSynchronizerWithTreeView.java:108) at org.eclipse.birt.report.designer.internal.ui.views.NonGEFSynchronizerWithTreeView$1.selectionChanged(NonGEFSynchronizerWithTreeView.java:157) at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1044) at org.eclipse.core.runtime.Platform.run(Platform.java:783) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:148) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:160) at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:1784) at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:1027) at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1053) at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:209) at org.eclipse.jface.util.OpenStrategy.access$3(OpenStrategy.java:204) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:364) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3080) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2713) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163) 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.core.launcher.Main.invokeFramework(Main.java:334) at org.eclipse.core.launcher.Main.basicRun(Main.java:278) at org.eclipse.core.launcher.Main.run(Main.java:973) at org.eclipse.core.launcher.Main.main(Main.java:948)

Files changed in fix:
UI/org.eclipse.birt.report.designer.core/src/org/eclipse/birt/report/designer/core/model/LibRootModel.java UI/org.eclipse.birt.report.designer.core/src/org/eclipse/birt/report/designer/core/model/LibraryHandleAdapter.java