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

Bug 323703

Summary: [Properties view] Unexpected error when editing a Literal Integer
Product: [Modeling] Papyrus Reporter: Mathieu Velten <mathieu.velten>
Component: CoreAssignee: Camille Letavernier <cletavernier>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3    
Version: 0.7.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Mathieu Velten CLA 2010-08-26 09:09:19 EDT
I am getting an unexpected error when trying to edit the value of a Literal Integer in the properties view using the UML tab :

Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
	at org.eclipse.uml2.uml.internal.impl.LiteralIntegerImpl.eSet(LiteralIntegerImpl.java:245)
	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:1081)
	at org.eclipse.papyrus.properties.runtime.modelhandler.emf.StringEMFModelHandler.setValueInModel(StringEMFModelHandler.java:47)
	at org.eclipse.papyrus.properties.runtime.controller.EMFTStructuralFeatureController.setValueInModel(EMFTStructuralFeatureController.java:169)
	at org.eclipse.papyrus.properties.runtime.controller.EMFTPropertyEditorController$EMFTControllerCommand.doExecuteWithResult(EMFTPropertyEditorController.java:94)
	at org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand.doExecute(AbstractTransactionalCommand.java:247)
	at org.eclipse.emf.workspace.AbstractEMFOperation.execute(AbstractEMFOperation.java:150)
	at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:511)
	... 121 more
	
Using the advanced tab I am getting a very weird behavior : when editing the value (just a click on the "0") the box is filled with something like "org.eclipse.emf.edit.provider.ItemPropertyDescriptor$PropertyValueWrapper@1894f8c".

however if I write a number it just works. This behavior is not trigerred in the properties view of the hierarchical uml editor.
Comment 1 Mathieu Velten CLA 2010-08-30 05:57:06 EDT
The first issue has been fixed by commit 2625.
However the weird behavior in the advanced tab is still present.
Comment 2 Camille Letavernier CLA 2011-09-23 08:01:38 EDT
This problem doesn't seem to exist anymore. I don't know if that's because I cannot reproduce it, if it has been fixed, or if it disappeared with the new property view framework (Which would be strange as the new framework handles the advanced tab exactly as the previous one).