Project: Birt
Bug 313835 [Regression]Exception thrown out when click to fold Embedded images node in Outline
Reported: 2010-05-20 22:10:55 | Status: closed fixed

Description: Exception thrown out when click to fold Embedded images node in Outline Build: 2.6.0.v20100521-0630 Steps to reproduce: 1. New a report 2. Insert an Embedded image 3. Click Embedded images node in Outline Actual result: Exception thrown out ErrorLog: java.lang.ClassCastException: org.eclipse.birt.report.model.api.EmbeddedImageHandle cannot be cast to org.eclipse.birt.report.model.api.DesignElementHandle at org.eclipse.birt.report.designer.internal.ui.views.LibraryElementImageDecorator.getElementFlag(LibraryElementImageDecorator.java:76) at org.eclipse.birt.report.designer.internal.ui.views.LibraryElementImageDecorator.decorateImage(LibraryElementImageDecorator.java:37) at org.eclipse.birt.report.designer.internal.ui.views.DefaultNodeProvider.decorateImage(DefaultNodeProvider.java:333) at org.eclipse.birt.report.designer.internal.ui.views.DefaultNodeProvider.getNodeIcon(DefaultNodeProvider.java:326) at org.eclipse.birt.report.designer.internal.ui.views.ViewsTreeProvider.getImage(ViewsTreeProvider.java:128) at org.eclipse.jface.viewers.WrappedViewerLabelProvider.getImage(WrappedViewerLabelProvider.java:117) at org.eclipse.jface.viewers.WrappedViewerLabelProvider.update(WrappedViewerLabelProvider.java:165) at org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn.java:152) at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:934) at org.eclipse.jface.viewers.AbstractTreeViewer$UpdateItemSafeRunnable.run(AbstractTreeViewer.java:102) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175) at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:1014) at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:481) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175) at org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java:2141) at org.eclipse.jface.viewers.AbstractTreeViewer.createTreeItem(AbstractTreeViewer.java:829) at org.eclipse.jface.viewers.AbstractTreeViewer$1.run(AbstractTreeViewer.java:804) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:778) at org.eclipse.jface.viewers.TreeViewer.createChildren(TreeViewer.java:644) at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:749) at org.eclipse.jface.viewers.AbstractTreeViewer.handleTreeExpand(AbstractTreeViewer.java:1444) at org.eclipse.jface.viewers.TreeViewer.handleTreeExpand(TreeViewer.java:952) at org.eclipse.jface.viewers.AbstractTreeViewer$4.treeExpanded(AbstractTreeViewer.java:1455) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:132) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1052) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1076) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061) at org.eclipse.swt.widgets.Tree.wmNotifyChild(Tree.java:7408) at org.eclipse.swt.widgets.Control.wmNotify(Control.java:5095) at org.eclipse.swt.widgets.Composite.wmNotify(Composite.java:1887) at org.eclipse.swt.widgets.Control.WM_NOTIFY(Control.java:4725) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4214) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4873) at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method) at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:2362) at org.eclipse.swt.widgets.Tree.callWindowProc(Tree.java:1536) at org.eclipse.swt.widgets.Tree.WM_LBUTTONDOWN(Tree.java:6303) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4194) at org.eclipse.swt.widgets.Tree.windowProc(Tree.java:5844) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4886) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2459) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3655) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2624) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2588) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2422) at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:670) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:663) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) 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:369) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574) at org.eclipse.equinox.launcher.Main.run(Main.java:1407)

Files changed in fix:
UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/views/LibraryElementImageDecorator.java