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

Bug 361939

Summary: [EMF Compare UI] Unable to export EMF Diff and save result
Product: [Modeling] EMFCompare Reporter: Arthur Daussy <arthur.daussy>
Component: CoreAssignee: EMF Compare <emf.compare-inbox>
Status: CLOSED FIXED QA Contact:
Severity: critical    
Priority: P3 CC: laurent.goubet
Version: 1.3   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Possible correction for this bug none

Description Arthur Daussy CLA 2011-10-25 10:54:39 EDT
Try to export emfDiff model you will get the following error:

java.lang.ClassCastException: org.eclipse.emf.compare.ui.ModelCompareInput cannot be cast to org.eclipse.emf.compare.diff.metamodel.ComparisonSnapshot
	at org.eclipse.emf.compare.ui.export.ExportMenu$1.run(ExportMenu.java:98)
	at org.eclipse.emf.compare.ui.export.ExportMenu.run(ExportMenu.java:304)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
	at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:452)
	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:4165)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
	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:344)
	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:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
Comment 1 Arthur Daussy CLA 2011-10-25 11:42:13 EDT
Created attachment 205929 [details]
Possible correction for this bug

I thinks this patch might be a correction for this bug.
Comment 2 Laurent Goubet CLA 2011-10-26 05:00:47 EDT
I had a patch similar to this ready for commit, it has now been pushed to master.
Comment 3 Laurent Goubet CLA 2013-01-17 08:32:45 EST
batch-closing a bunch of "RESOLVED" bugs.