Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 318121 - CCE and NPE in Sample Reflective Ecore Editor
Summary: CCE and NPE in Sample Reflective Ecore Editor
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: Mapping (show other bugs)
Version: 2.6.0   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Ed Merks CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-27 05:54 EDT by Ed Willink CLA
Modified: 2010-11-05 05:41 EDT (History)
0 users

See Also:


Attachments
Example project (2.43 KB, application/x-download)
2010-06-27 05:54 EDT, Ed Willink CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Willink CLA 2010-06-27 05:54:57 EDT
Created attachment 172852 [details]
Example project

Helios Modeling:

In the attached project, opening the ecore2ecore file in the Sample Reflective Ecore Editor and then navigating to show the properties of an element mapping gives:

java.lang.ClassCastException: org.eclipse.emf.mapping.provider.MappedObjectItemProvider cannot be cast to org.eclipse.emf.ecore.EObject
	at org.eclipse.emf.edit.provider.ItemProviderAdapter.getNewChildDescriptors(ItemProviderAdapter.java:760)
	at org.eclipse.emf.edit.provider.ItemProviderDecorator.getNewChildDescriptors(ItemProviderDecorator.java:316)
	at org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain.getNewChildDescriptors(AdapterFactoryEditingDomain.java:746)
	at org.eclipse.emf.ecore.presentation.EcoreActionBarContributor.selectionChangedGen(EcoreActionBarContributor.java:666)
	at org.eclipse.emf.ecore.presentation.EcoreActionBarContributor.selectionChanged(EcoreActionBarContributor.java:690)
	at org.eclipse.emf.ecore.presentation.EcoreActionBarContributor.setActiveEditorGen(EcoreActionBarContributor.java:612)
	at org.eclipse.emf.ecore.presentation.EcoreActionBarContributor.setActiveEditor(EcoreActionBarContributor.java:620)
	at org.eclipse.ui.internal.EditorActionBars.partChanged(EditorActionBars.java:343)
	at org.eclipse.ui.internal.WorkbenchPage$3.run(WorkbenchPage.java:635)

and also

java.lang.NullPointerException
	at org.eclipse.emf.mapping.impl.MappingRootImpl.canCreateMapping(MappingRootImpl.java:554)
	at org.eclipse.emf.mapping.ecore2ecore.impl.Ecore2EcoreMappingRootImpl.canCreateMapping(Ecore2EcoreMappingRootImpl.java:106)
	at org.eclipse.emf.mapping.provider.MappingItemProvider$6.prepare(MappingItemProvider.java:876)
	at org.eclipse.emf.common.command.AbstractCommand.canExecute(AbstractCommand.java:114)
	at org.eclipse.emf.common.command.CompoundCommand.prepare(CompoundCommand.java:247)
	at org.eclipse.emf.edit.command.DeleteCommand.prepare(DeleteCommand.java:105)
	at org.eclipse.emf.common.command.AbstractCommand.canExecute(AbstractCommand.java:114)
	at org.eclipse.emf.edit.ui.action.CommandActionHandler.updateSelection(CommandActionHandler.java:105)
	at org.eclipse.ui.actions.BaseSelectionListenerAction.selectionChanged(BaseSelectionListenerAction.java:124)
	at org.eclipse.ui.actions.BaseSelectionListenerAction.selectionChanged(BaseSelectionListenerAction.java:137)
	at org.eclipse.emf.ecore.presentation.EcoreEditor.setSelection(EcoreEditor.java:1711)
	at org.eclipse.emf.ecore.presentation.EcoreEditor.handleActivate(EcoreEditor.java:593)
	at org.eclipse.emf.ecore.presentation.EcoreEditor$1.partActivated(EcoreEditor.java:353)
Comment 1 Ed Merks CLA 2010-09-05 14:59:18 EDT
A fix is committed to CVS for 2.7.
Comment 2 Ed Merks CLA 2010-11-05 05:41:36 EDT
The fix is available in the latest build for the stream.