Bug 141743 - Lite Generator: ClassCastException while executing undo after setting property/restoring default value in the property sheet
Summary: Lite Generator: ClassCastException while executing undo after setting propert...
Status: RESOLVED FIXED
Alias: None
Product: GMF-Tooling (ARCHIVED)
Classification: Modeling
Component: Core (show other bugs)
Version: 1.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Boris Blajer CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2006-05-15 08:07 EDT by Boris Blajer CLA
Modified: 2010-07-19 22:19 EDT (History)
1 user (show)

See Also:


Attachments
Fixes the subj (13.56 KB, patch)
2006-05-15 08:24 EDT, Boris Blajer CLA
no flags Details | Diff
Fixes the subj (13.56 KB, patch)
2006-05-15 08:25 EDT, Boris Blajer CLA
no flags Details | Diff
Fixes the subj (98.74 KB, patch)
2006-05-15 10:39 EDT, Boris Blajer CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Boris Blajer CLA 2006-05-15 08:07:29 EDT
Open a generated "lite" editor, create any element and set any String single-valued property. Switch to the editor and execute Undo. The property is not reset to its previous value, and a ClassCastException appears in the log. Same happens if "Restore default value" operation is undone.

The exception follows.

java.lang.ClassCastException: org.eclipse.emf.edit.provider.ItemPropertyDescriptor$PropertyValueWrapper
	at org.eclipse.emf.ecore.provider.ENamedElementItemProvider$1.setPropertyValue(ENamedElementItemProvider.java:99)
	at org.eclipse.emf.edit.ui.provider.PropertySource.setPropertyValue(PropertySource.java:118)
	at org.eclipse.gef.ui.properties.SetValueCommand.undo(SetValueCommand.java:93)
	at org.eclipse.gef.commands.CompoundCommand.undo(CompoundCommand.java:169)
	at org.eclipse.gef.commands.ForwardUndoCompoundCommand.undo(ForwardUndoCompoundCommand.java:52)
	at org.eclipse.gef.commands.CommandStack.undo(CommandStack.java:324)
	at org.eclipse.gef.ui.actions.UndoAction.run(UndoAction.java:93)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:499)
	at org.eclipse.ui.actions.RetargetAction.runWithEvent(RetargetAction.java:229)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:539)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:400)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:925)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3346)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2966)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
	at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
	at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:169)
	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:585)
	at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
	at org.eclipse.core.launcher.Main.run(Main.java:977)
	at org.eclipse.core.launcher.Main.main(Main.java:952)
Comment 1 Boris Blajer CLA 2006-05-15 08:24:28 EDT
Created attachment 41433 [details]
Fixes the subj
Comment 2 Boris Blajer CLA 2006-05-15 08:25:55 EDT
Created attachment 41434 [details]
Fixes the subj
Comment 3 Boris Blajer CLA 2006-05-15 10:39:37 EDT
Created attachment 41455 [details]
Fixes the subj

A new patch that includes *Generator.java class as well as the modified template.
Comment 4 Artem Tikhomirov CLA 2006-05-15 12:03:37 EDT
reviewed and committed
Comment 5 Eclipse Webmaster CLA 2010-07-19 22:19:58 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Generation was the original product and component for this bug