Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 337344

Summary: Restore defaults action doesn't handle implied element properties
Product: z_Archived Reporter: Konstantin Komissarchik <konstantin>
Component: SapphireAssignee: Konstantin Komissarchik <konstantin>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: raj.alagumalai
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Konstantin Komissarchik CLA 2011-02-16 13:19:59 EST
If you have a section whose content has a with directive that traverses an implied element property, invoking the restore defaults action will trigger an exception like the following.

The correct behavior is to skip inside the implied element property and to include properties from inside the with block.

java.lang.ClassCastException:
oracle.eclipse.tools.weblogic.descriptors.internal.DatabasePreparedStatementProfilingConfig cannot be cast to
org.eclipse.sapphire.modeling.ModelElementHandle
at org.eclipse.sapphire.modeling.ModelElement.read(ModelElement.java:168)
at
org.eclipse.sapphire.ui.swt.renderer.actions.internal.RestoreDefaultsActionHandler.run(RestoreDefaultsActionHandler.java:111)
at
org.eclipse.sapphire.ui.SapphireActionHandler.execute(SapphireActionHandler.java:89)
at
org.eclipse.sapphire.ui.swt.renderer.SapphireToolBarActionPresentation$1.widgetSelected(SapphireToolBarActionPresentation.java:106)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
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(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:620)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
Comment 1 Konstantin Komissarchik CLA 2011-02-16 14:10:38 EST
Fixed.
Comment 2 Raj Alagumalai CLA 2011-02-25 12:21:57 EST
verified on build 161
Comment 3 Konstantin Komissarchik CLA 2011-02-25 12:25:49 EST
Closing.