Hi,
I have the following problem: I set the default value to a parameter using the set command:
SetCommand.create(editingDomain, parameter, UMLPackage.eINSTANCE.getParameter_Default(), defaultValue)
and it's working ok, but when I try to undo, I've seen that the unsetDefault (of ParameterOperations) is trying to do this:
parameter.eUnset(UMLPackage.Literals.PROPERTY__DEFAULT_VALUE);
though the PROPERTY__DEFAULT was not set -- I thought maybe I should set this feature also, but it does not work like this.
And my problem is that it searches for this feature - Property__Default for the parameter, and it does not exist, so the "undo" throws an nullpointerexception.
FYI:
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDynamicUnset(BasicEObjectImpl.java:1208)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDynamicUnset(BasicEObjectImpl.java:1197)
at org.eclipse.uml2.uml.internal.impl.ParameterImpl.eUnset(ParameterImpl.java:1598)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eUnset(BasicEObjectImpl.java:1156)
at org.eclipse.uml2.uml.internal.operations.ParameterOperations.unsetDefault(ParameterOperations.java:292)
at org.eclipse.uml2.uml.internal.impl.ParameterImpl.unsetDefault(ParameterImpl.java:834)
at org.eclipse.uml2.uml.internal.impl.ParameterImpl.eUnset(ParameterImpl.java:1583)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eUnset(BasicEObjectImpl.java:1156)
So is something that I might have missed on doing on setting the parameter default value?
Thanks,
Ioana