Project: Birt
Bug 268278 [Regression]Exception thrown out when open Advanced view of Combo box parameter which has default value
Reported: 2009-03-12 02:10:34 | Status: closed fixed

Description: [Regression]Exception thrown out when open Advanced view of Combo box parameter which has default value Build number: 2.5.0.v20090312-0630 Steps to reproduce: 1, New a static combo box parameter 2, Specify some static value and set one as default value 3, Select the parameter in Data source Explorer 4, Open Advanced view in Property Editor Expected result: No Exception thrown out Actual result: Exception was thrown out Error log: org.eclipse.birt.report.designer.core.runtime.GUIException: org.eclipse.birt.report.model.api.Expression at org.eclipse.birt.report.designer.core.runtime.GUIException.createGUIException(GUIException.java:78) at org.eclipse.birt.report.designer.internal.ui.util.ExceptionHandler.handle(ExceptionHandler.java:169) at org.eclipse.birt.report.designer.internal.ui.util.ExceptionHandler.handle(ExceptionHandler.java:150) at org.eclipse.birt.report.designer.internal.ui.util.ExceptionHandler.handle(ExceptionHandler.java:89) at org.eclipse.birt.report.designer.internal.ui.editors.parts.event.ModelEventManager.postModelEvent(ModelEventManager.java:128) at org.eclipse.birt.report.designer.internal.ui.editors.parts.event.ModelEventManager.postEvent(ModelEventManager.java:97) at org.eclipse.birt.report.designer.internal.ui.editors.parts.event.ModelEventManager.access$0(ModelEventManager.java:89) at org.eclipse.birt.report.designer.internal.ui.editors.parts.event.ModelEventManager$1.stackChanged(ModelEventManager.java:57) at org.eclipse.birt.report.model.activity.ActivityStack.sendNotifcations(ActivityStack.java:853) at org.eclipse.birt.report.model.activity.ActivityStack.commit(ActivityStack.java:723) at org.eclipse.birt.report.designer.internal.ui.views.actions.AbstractElementAction.run(AbstractElementAction.java:74) at org.eclipse.birt.report.designer.internal.ui.views.RenameListener.doubleClick(RenameListener.java:214) at org.eclipse.jface.viewers.StructuredViewer$1.run(StructuredViewer.java:808) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.runtime.Platform.run(Platform.java:874) 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.StructuredViewer.fireDoubleClick(StructuredViewer.java:806) at org.eclipse.jface.viewers.AbstractTreeViewer.handleDoubleSelect(AbstractTreeViewer.java:1419) at org.eclipse.jface.viewers.StructuredViewer$4.widgetDefaultSelected(StructuredViewer.java:1182) at org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEvent(OpenStrategy.java:238) at org.eclipse.jface.util.OpenStrategy.access$0(OpenStrategy.java:235) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:296) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3875) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3470) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2388) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2352) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2204) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:499) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:333) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:492) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) 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:368) 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:556) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:511) at org.eclipse.equinox.launcher.Main.run(Main.java:1270) Caused by: java.lang.ClassCastException: org.eclipse.birt.report.model.api.Expression at org.eclipse.birt.report.model.metadata.TextualPropertyType.toString(TextualPropertyType.java:88) at org.eclipse.birt.report.model.metadata.ListPropertyType.toString(ListPropertyType.java:135) at org.eclipse.birt.report.model.metadata.PropertyDefn.getStringValue(PropertyDefn.java:1074) at org.eclipse.birt.report.model.core.DesignElement.getStringProperty(DesignElement.java:1978) at org.eclipse.birt.report.model.api.DesignElementHandle.getStringProperty(DesignElementHandle.java:291) at org.eclipse.birt.report.model.api.GroupPropertyHandle.shareSameValue(GroupPropertyHandle.java:97) at org.eclipse.birt.report.model.api.GroupPropertyHandle.getDisplayValue(GroupPropertyHandle.java:211) at org.eclipse.birt.report.designer.core.model.views.property.GroupPropertyHandleWrapper.hashCode(GroupPropertyHandleWrapper.java:61) at org.eclipse.jface.viewers.CustomHashtable.hashCode(CustomHashtable.java:264) at org.eclipse.jface.viewers.CustomHashtable.getEntry(CustomHashtable.java:248) at org.eclipse.jface.viewers.CustomHashtable.containsKey(CustomHashtable.java:210) at org.eclipse.jface.viewers.AbstractTreeViewer.updateChildren(AbstractTreeViewer.java:2674) at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefreshStruct(AbstractTreeViewer.java:1862) at org.eclipse.jface.viewers.TreeViewer.internalRefreshStruct(TreeViewer.java:716) at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefreshStruct(AbstractTreeViewer.java:1869) at org.eclipse.jface.viewers.TreeViewer.internalRefreshStruct(TreeViewer.java:716) at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh(AbstractTreeViewer.java:1837) at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh(AbstractTreeViewer.java:1793) at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh(AbstractTreeViewer.java:1779) at org.eclipse.jface.viewers.StructuredViewer$7.run(StructuredViewer.java:1446) at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1381) at org.eclipse.jface.viewers.TreeViewer.preservingSelection(TreeViewer.java:402) at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1340) at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1444) at org.eclipse.jface.viewers.ColumnViewer.refresh(ColumnViewer.java:537) at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1403) at org.eclipse.birt.report.designer.internal.ui.views.attributes.widget.AdvancePropertyDescriptor.load(AdvancePropertyDescriptor.java:799) at org.eclipse.birt.report.designer.internal.ui.views.attributes.section.AdvancePropertySection.load(AdvancePropertySection.java:192) at org.eclipse.birt.report.designer.internal.ui.views.attributes.page.AttributePage.postElementEvent(AttributePage.java:259) at org.eclipse.birt.report.designer.internal.ui.editors.parts.event.ModelEventManager.postModelEvent(ModelEventManager.java:123) ... 42 more

Files changed in fix:
model/org.eclipse.birt.report.model.tests/test/org/eclipse/birt/report/model/metadata/StringPropertyTypeTest.java model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/metadata/TextualPropertyType.java